├── .idea
├── .name
├── misc.xml
├── scopes
│ └── scope_settings.xml
├── encodings.xml
├── vcs.xml
├── jsLibraryMappings.xml
├── modules.xml
└── OA-Sample.iml
├── README.md
├── source
├── view
│ ├── kit
│ │ ├── fbar.ui.js
│ │ ├── hbar.ui.js
│ │ ├── pbar.ui.js
│ │ ├── menu.ui.js
│ │ ├── share.ui.js
│ │ ├── fbar.ui
│ │ ├── hbar.ui
│ │ ├── pbar.ui
│ │ └── menu.ui
│ ├── apps
│ │ ├── cell0.ui.js
│ │ ├── cell1.ui.js
│ │ ├── cell2.ui.js
│ │ ├── memo
│ │ │ ├── url.ui.js
│ │ │ ├── memo.ui.js
│ │ │ └── url.ui
│ │ ├── scan
│ │ │ ├── url.ui.js
│ │ │ ├── scan.ui.js
│ │ │ ├── scan.ui
│ │ │ └── url.ui
│ │ ├── cell0.ui
│ │ ├── detail.ui.js
│ │ ├── cell1.ui
│ │ ├── add.ui.js
│ │ ├── cell2.ui
│ │ ├── detail.ui
│ │ └── apps.ui
│ ├── work
│ │ ├── add_cell.ui.js
│ │ ├── add_cell.ui
│ │ ├── cell0.ui.js
│ │ ├── work_all.ui
│ │ ├── work_att.ui
│ │ ├── cell4.ui.js
│ │ ├── cell1.ui.js
│ │ ├── comment.ui.js
│ │ ├── cell2.ui.js
│ │ ├── cell3.ui.js
│ │ ├── employer.ui.js
│ │ ├── work_att.ui.js
│ │ ├── work_all.ui.js
│ │ ├── employer.ui
│ │ ├── work.ui.js
│ │ ├── work.ui
│ │ ├── comment.ui
│ │ ├── add.ui
│ │ └── add.ui.js
│ ├── inform
│ │ ├── select_cell.ui.js
│ │ ├── seg_cell.ui.js
│ │ ├── cell1.ui.js
│ │ ├── cell0.ui.js
│ │ ├── cell2.ui.js
│ │ ├── comment_cell.ui.js
│ │ ├── detail.do.html
│ │ ├── slide_cell.ui
│ │ ├── select.ui.js
│ │ ├── seg_cell.ui
│ │ ├── select_cell.ui
│ │ ├── cell1.ui
│ │ ├── detail.ui.js
│ │ ├── cell0.ui
│ │ ├── cell2.ui
│ │ ├── select.ui
│ │ ├── inform.ui.js
│ │ ├── slide_cell.ui.js
│ │ ├── inform.ui
│ │ ├── comment_cell.ui
│ │ ├── comment.ui.js
│ │ ├── comment.ui
│ │ └── detail.ui
│ ├── contact
│ │ ├── cell0.ui.js
│ │ └── cell0.ui
│ ├── message
│ │ ├── cell0.ui.js
│ │ ├── cell0.ui
│ │ ├── message.ui.js
│ │ └── message.ui
│ ├── setting
│ │ ├── about
│ │ │ ├── about.do.html
│ │ │ ├── about.ui.js
│ │ │ └── about.ui
│ │ ├── feedback
│ │ │ ├── feedback.ui.js
│ │ │ └── feedback.ui
│ │ ├── edit
│ │ │ └── editpwd.ui.js
│ │ └── attention
│ │ │ ├── attention.ui
│ │ │ └── attention.ui.js
│ ├── forget.ui.js
│ ├── index.ui.js
│ ├── reg.ui.js
│ └── forget.ui
├── image
│ ├── logo.png
│ ├── apps@add.png
│ ├── apps@memo.png
│ ├── apps@scan.png
│ ├── loading.gif
│ ├── login@bg.png
│ ├── scan@open.png
│ ├── share_qq.png
│ ├── share_wb.png
│ ├── share_wx.png
│ ├── web@back.png
│ ├── web@next.png
│ ├── web@stop.png
│ ├── work@add.png
│ ├── action@apps.png
│ ├── action@work.png
│ ├── apps@delete.png
│ ├── arrow@down.png
│ ├── arrow@right.png
│ ├── inform@all.png
│ ├── share_copy.png
│ ├── share_qzone.png
│ ├── topbar@back.png
│ ├── user@avatar.png
│ ├── web@backed.png
│ ├── web@nexted.png
│ ├── web@reload.png
│ ├── action@apps_d.png
│ ├── action@contact.png
│ ├── action@inform.png
│ ├── action@message.png
│ ├── action@work_d.png
│ ├── apps@default.png
│ ├── apps@refresh.png
│ ├── apps@setting.png
│ ├── contact@delete.png
│ ├── contact@search.png
│ ├── feedback@send.png
│ ├── inform@comment.png
│ ├── inform@default.png
│ ├── inform@select.png
│ ├── work@comment.png
│ ├── work@default.png
│ ├── work@location.png
│ ├── action@contact_d.png
│ ├── action@inform_d.png
│ ├── action@message_d.png
│ ├── contact@refresh.png
│ ├── login@remember0.png
│ ├── login@remember1.png
│ ├── contact@switch_down.png
│ └── contact@switch_up.png
├── script
│ ├── open.js
│ ├── verify.js
│ └── upgrade.js
└── app.js
├── initdata
├── oa.db
└── AllEmployers.zip
├── app.doproj
├── .project
└── .metadata
├── app-dependency-modules
├── do_ImageBrowser.json
├── do_ProgressBar.json
├── do_BarcodeView.json
├── do_Network.json
├── do_Camera.json
├── do_Timer.json
├── do_SwitchView.json
├── do_SegmentView.json
├── do_FrameAnimationView.json
├── do_VideoView.json
├── do_DateTimePicker.json
├── do_iFlyVoice.json
├── do_DataCache.json
├── do_ViewShower.json
├── do_IndexListView.json
├── do_Notification.json
├── do_Alipay.json
└── do_HuanXinIM.json
└── app-dependency-modules.json
/.idea/.name:
--------------------------------------------------------------------------------
1 | OA-Sample
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Natto
2 |
--------------------------------------------------------------------------------
/source/view/kit/fbar.ui.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/view/kit/hbar.ui.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/initdata/oa.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/initdata/oa.db
--------------------------------------------------------------------------------
/source/image/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/logo.png
--------------------------------------------------------------------------------
/source/view/kit/pbar.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").on("touch", function(){
2 | return false;
3 | });
4 |
--------------------------------------------------------------------------------
/initdata/AllEmployers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/initdata/AllEmployers.zip
--------------------------------------------------------------------------------
/source/image/apps@add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@add.png
--------------------------------------------------------------------------------
/source/image/apps@memo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@memo.png
--------------------------------------------------------------------------------
/source/image/apps@scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@scan.png
--------------------------------------------------------------------------------
/source/image/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/loading.gif
--------------------------------------------------------------------------------
/source/image/login@bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/login@bg.png
--------------------------------------------------------------------------------
/source/image/scan@open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/scan@open.png
--------------------------------------------------------------------------------
/source/image/share_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/share_qq.png
--------------------------------------------------------------------------------
/source/image/share_wb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/share_wb.png
--------------------------------------------------------------------------------
/source/image/share_wx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/share_wx.png
--------------------------------------------------------------------------------
/source/image/web@back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/web@back.png
--------------------------------------------------------------------------------
/source/image/web@next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/web@next.png
--------------------------------------------------------------------------------
/source/image/web@stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/web@stop.png
--------------------------------------------------------------------------------
/source/image/work@add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/work@add.png
--------------------------------------------------------------------------------
/source/image/action@apps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@apps.png
--------------------------------------------------------------------------------
/source/image/action@work.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@work.png
--------------------------------------------------------------------------------
/source/image/apps@delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@delete.png
--------------------------------------------------------------------------------
/source/image/arrow@down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/arrow@down.png
--------------------------------------------------------------------------------
/source/image/arrow@right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/arrow@right.png
--------------------------------------------------------------------------------
/source/image/inform@all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/inform@all.png
--------------------------------------------------------------------------------
/source/image/share_copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/share_copy.png
--------------------------------------------------------------------------------
/source/image/share_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/share_qzone.png
--------------------------------------------------------------------------------
/source/image/topbar@back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/topbar@back.png
--------------------------------------------------------------------------------
/source/image/user@avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/user@avatar.png
--------------------------------------------------------------------------------
/source/image/web@backed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/web@backed.png
--------------------------------------------------------------------------------
/source/image/web@nexted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/web@nexted.png
--------------------------------------------------------------------------------
/source/image/web@reload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/web@reload.png
--------------------------------------------------------------------------------
/source/image/action@apps_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@apps_d.png
--------------------------------------------------------------------------------
/source/image/action@contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@contact.png
--------------------------------------------------------------------------------
/source/image/action@inform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@inform.png
--------------------------------------------------------------------------------
/source/image/action@message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@message.png
--------------------------------------------------------------------------------
/source/image/action@work_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@work_d.png
--------------------------------------------------------------------------------
/source/image/apps@default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@default.png
--------------------------------------------------------------------------------
/source/image/apps@refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@refresh.png
--------------------------------------------------------------------------------
/source/image/apps@setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/apps@setting.png
--------------------------------------------------------------------------------
/source/image/contact@delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/contact@delete.png
--------------------------------------------------------------------------------
/source/image/contact@search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/contact@search.png
--------------------------------------------------------------------------------
/source/image/feedback@send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/feedback@send.png
--------------------------------------------------------------------------------
/source/image/inform@comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/inform@comment.png
--------------------------------------------------------------------------------
/source/image/inform@default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/inform@default.png
--------------------------------------------------------------------------------
/source/image/inform@select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/inform@select.png
--------------------------------------------------------------------------------
/source/image/work@comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/work@comment.png
--------------------------------------------------------------------------------
/source/image/work@default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/work@default.png
--------------------------------------------------------------------------------
/source/image/work@location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/work@location.png
--------------------------------------------------------------------------------
/source/view/apps/cell0.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "name.text": "name"
4 | });
--------------------------------------------------------------------------------
/source/image/action@contact_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@contact_d.png
--------------------------------------------------------------------------------
/source/image/action@inform_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@inform_d.png
--------------------------------------------------------------------------------
/source/image/action@message_d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/action@message_d.png
--------------------------------------------------------------------------------
/source/image/contact@refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/contact@refresh.png
--------------------------------------------------------------------------------
/source/image/login@remember0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/login@remember0.png
--------------------------------------------------------------------------------
/source/image/login@remember1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/login@remember1.png
--------------------------------------------------------------------------------
/source/image/contact@switch_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/contact@switch_down.png
--------------------------------------------------------------------------------
/source/image/contact@switch_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/do-project/OA-Sample/HEAD/source/image/contact@switch_up.png
--------------------------------------------------------------------------------
/source/view/apps/cell1.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "name.text": "name"
4 | });
5 |
--------------------------------------------------------------------------------
/source/view/work/add_cell.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.tag": "$+",
3 | "icon.source": "$s"
4 | });
5 |
6 |
--------------------------------------------------------------------------------
/source/view/inform/select_cell.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "name.text": "name"
4 | });
5 |
--------------------------------------------------------------------------------
/app.doproj:
--------------------------------------------------------------------------------
1 | {"Base":{"AppID":"64d7fc6a-046f-43b3-a95e-fba986464642","ScriptType":"javascript"},"DesignEnvironment":{"ScreenHeight":"854","ScreenWidth":"480"}}
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/source/view/inform/seg_cell.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "name.text": "name",
4 | "name.fontColor": "fontColor"
5 | });
6 |
--------------------------------------------------------------------------------
/source/view/inform/cell1.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "type.source": "inforTypeIcon",
3 | "title.text": "title",
4 | "describe.text": "describe"
5 | });
6 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source/view/contact/cell0.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "nameP.text": "nameP",
4 | "itcodeP.text": "itcodeP",
5 | "departname.text": "departname"
6 | });
7 |
--------------------------------------------------------------------------------
/source/view/inform/cell0.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "type.source": "inforTypeIcon",
4 | "title.text": "title",
5 | "describe.text": "describe"
6 | });
7 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/source/view/inform/cell2.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "type.source": "inforTypeIcon",
3 | "title.text": "title",
4 | "describe.text": "describe",
5 | "comment.text": "comment"
6 | });
7 |
--------------------------------------------------------------------------------
/source/view/inform/comment_cell.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "icon.source": "icon",
3 | "name.text": "employerName",
4 | "createTime.text": "createTime",
5 | "message.text": "message"
6 | });
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/jsLibraryMappings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/source/view/message/cell0.ui.js:
--------------------------------------------------------------------------------
1 | ui("$").setMapping({
2 | "UserLogo.source": "userlogo",
3 | "NickName.text": "nickname",
4 | "Time.text": "time",
5 | "LastMsg.text": "lastmsg",
6 | "Status.visible": "visible",
7 | "Status.text": "status"
8 | });
9 |
--------------------------------------------------------------------------------
/source/view/apps/cell2.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 |
4 | ui("$").setMapping({
5 | "icon.source": "icon",
6 | "name.text": "name",
7 | "tag": "id"
8 | });
9 |
10 | ui("action_delete").on("touch", function(){
11 | page.fire("delete-listen", rootview.tag);
12 | });
13 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/source/script/open.js:
--------------------------------------------------------------------------------
1 | var deviceone = require("deviceone");
2 | var app = deviceone.sm("do_App");
3 |
4 | module.exports.start = function(source, data){
5 | var option = {source: source};
6 | if (data) option.data = data;
7 | option.statusBarFgColor = "white";
8 | option.statusBarBgColor = "e03e3f";
9 | app.openPage(option);
10 | };
11 |
--------------------------------------------------------------------------------
/source/view/inform/detail.do.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 加载失败
11 |
12 |
--------------------------------------------------------------------------------
/.idea/OA-Sample.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/source/view/kit/menu.ui.js:
--------------------------------------------------------------------------------
1 | var page = sm("do_Page");
2 |
3 | var action_cap = ui("action_cap");
4 | var action_abl = ui("action_abl");
5 |
6 | action_abl.on("touch", function(){
7 | page.fire("menu-listen2", {state: 2});
8 | });
9 |
10 | action_cap.on("touch", function(){
11 | page.fire("menu-listen1", {state: 1});
12 | });
13 |
14 | ui("$").on("touch", function(){
15 | page.fire("menu-listen0", {state: 0});
16 | });
--------------------------------------------------------------------------------
/source/view/setting/about/about.do.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | DeviceOne
13 |
14 |
--------------------------------------------------------------------------------
/source/view/setting/about/about.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var rootview = ui("$");
5 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
6 |
7 | page.on("back", function(){
8 | app.closePage();
9 | });
10 |
11 | ui("action_back").on("touch", function(){
12 | app.closePage();
13 | });
14 |
15 | ui("webview").on("start", function(){
16 | pbar.visible = true;
17 | }).on("loaded", function(){
18 | pbar.visible = false;
19 | });
20 |
--------------------------------------------------------------------------------
/source/view/kit/share.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 |
5 | rootview.on("touch", function(){
6 | this.visible = false;
7 | });
8 |
9 | var action_alys = [
10 | ui("action_qq"),
11 | ui("action_qzone"),
12 | ui("action_wx"),
13 | ui("action_wb"),
14 | ui("action_copy")
15 | ];
16 |
17 | for (var i = 0; i < action_alys.length; i++) {
18 | action_alys[i].on("touch", function(){
19 | rootview.visible = false;
20 | page.fire("share-listen", this.id.substr(7));
21 | })
22 | }
23 |
--------------------------------------------------------------------------------
/source/view/apps/memo/url.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var external = sm("do_External");
6 |
7 | page.on("back", function(){
8 | app.closePage();
9 | });
10 |
11 | ui("action_back").on("touch", function(){
12 | app.closePage();
13 | });
14 |
15 | var data_url = page.getData();
16 | var scan_url = ui("scan_url");
17 | var action_open = ui("action_open");
18 |
19 | scan_url.text = data_url;
20 | action_open.on("touch", function(){
21 | external.openURL(data_url);
22 | });
23 |
--------------------------------------------------------------------------------
/source/view/apps/scan/url.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var external = sm("do_External");
6 |
7 | page.on("back", function(){
8 | app.closePage();
9 | });
10 |
11 | ui("action_back").on("touch", function(){
12 | app.closePage();
13 | });
14 |
15 | var data_url = page.getData();
16 | var scan_url = ui("scan_url");
17 | var action_open = ui("action_open");
18 |
19 | scan_url.text = data_url;
20 | action_open.on("touch", function(){
21 | external.openURL(data_url);
22 | });
23 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | OA-Sample
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | com.eclipsesource.jshint.ui.builder
15 |
16 |
17 |
18 |
19 |
20 | net.deviceone.ui.DeviceOneNature
21 |
22 |
23 |
--------------------------------------------------------------------------------
/source/view/work/add_cell.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "96",
5 | "height": "96",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "icon",
10 | "x": "3",
11 | "y": "3",
12 | "width": "90",
13 | "height": "90",
14 | "type": "do_ImageView",
15 | "cacheType": "always",
16 | "scale": "fillxory",
17 | "source": "source://image/apps@add.png"
18 | }
19 | ]
20 | }
21 | }
--------------------------------------------------------------------------------
/source/view/inform/slide_cell.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "do_listview",
10 | "width": "480",
11 | "height": "650",
12 | "type": "do_ListView",
13 | "footerView": "source://view/kit/fbar.ui",
14 | "headerView": "source://view/kit/hbar.ui",
15 | "isFooterVisible": "true",
16 | "isHeaderVisible": "true",
17 | "templates": "source://view/inform/cell0.ui,source://view/inform/cell1.ui,source://view/inform/cell2.ui"
18 | }
19 | ]
20 | }
21 | }
--------------------------------------------------------------------------------
/source/view/work/cell0.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 |
5 | rootview.setMapping({
6 | "icon.tag": "employerId",
7 | "icon.source": "icon",
8 | "name.text": "name",
9 | "message.text": "message",
10 |
11 | "createTime.text": "createTime",
12 | "actionTips.tag": "id",
13 |
14 | "commentList.text": "commentList",
15 | "commentList.visible": "commentVis"
16 | });
17 |
18 | var icon = ui("icon");
19 | var name = ui("name");
20 | icon.on("touch", function(){
21 | page.fire("icon-listen", {id: this.tag, name: name.text});
22 | });
23 |
24 | var actionTips = ui("actionTips");
25 | actionTips.on("touch", function(){
26 | page.fire("comment-listen", {id: this.tag});
27 | });
28 |
--------------------------------------------------------------------------------
/source/view/kit/fbar.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "type": "do_ALayout",
6 | "views": [
7 | {
8 | "id": "do_progressbar_1",
9 | "x": "150",
10 | "y": "15",
11 | "width": "50",
12 | "height": "50",
13 | "type": "do_ProgressBar"
14 | },
15 | {
16 | "id": "do_label_1",
17 | "x": "210",
18 | "y": "20",
19 | "width": "150",
20 | "height": "40",
21 | "type": "do_Label",
22 | "fontSize": "20",
23 | "text": "上拉加载..."
24 | }
25 | ]
26 | }
27 | }
--------------------------------------------------------------------------------
/source/view/kit/hbar.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "type": "do_ALayout",
6 | "views": [
7 | {
8 | "id": "do_progressbar_1",
9 | "x": "150",
10 | "y": "15",
11 | "width": "50",
12 | "height": "50",
13 | "type": "do_ProgressBar"
14 | },
15 | {
16 | "id": "do_label_1",
17 | "x": "210",
18 | "y": "20",
19 | "width": "150",
20 | "height": "40",
21 | "type": "do_Label",
22 | "fontSize": "20",
23 | "text": "下拉刷新..."
24 | }
25 | ]
26 | }
27 | }
--------------------------------------------------------------------------------
/source/view/inform/select.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var rootview = ui("$");
5 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
6 | var $U = require("url");
7 |
8 | page.on("back", function(data){
9 | app.closePage(data);
10 | });
11 |
12 | ui("action_back").on("touch", function(){
13 | app.closePage();
14 | });
15 |
16 | var listview = ui("do_listview");
17 | var listdata = mm("do_ListData");
18 | listview.bindItems(listdata);
19 |
20 | var type_all = page.getData();
21 | listdata.removeAll();
22 | listdata.addData(type_all);
23 | listview.refreshItems();
24 |
25 | listview.on("touch", function(data){
26 | page.fire("back", {
27 | index: data,
28 | inform_select: true
29 | });
30 | });
31 |
--------------------------------------------------------------------------------
/source/view/apps/memo/memo.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var open = require("open");
6 |
7 | page.on("back", function(){
8 | app.closePage();
9 | });
10 |
11 | ui("action_back").on("touch", function(){
12 | app.closePage();
13 | });
14 |
15 | var action_save = ui("action_save");
16 | var action_text = ui("action_text");
17 | var action_photo = ui("action_photo");
18 | var action_audio = ui("action_audio");
19 |
20 | action_save.on("touch", function(){
21 | page.hideKeyboard();
22 | nf.alert("保存")
23 | });
24 |
25 | action_text.on("touch", function(){
26 | nf.alert("文本")
27 | });
28 |
29 | action_photo.on("touch", function(){
30 | nf.alert("照片")
31 | });
32 |
33 | action_audio.on("touch", function(){
34 | nf.alert("音频")
35 | });
36 |
--------------------------------------------------------------------------------
/source/view/work/work_all.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_listview_all",
11 | "width": "480",
12 | "height": "700",
13 | "bgColor": "FFFFFFFF",
14 | "type": "do_ListView",
15 | "footerView": "source://view/kit/fbar.ui",
16 | "headerView": "source://view/kit/hbar.ui",
17 | "isFooterVisible": "true",
18 | "isHeaderVisible": "true",
19 | "templates": "source://view/work/cell0.ui,source://view/work/cell1.ui,source://view/work/cell2.ui,source://view/work/cell3.ui,source://view/work/cell4.ui"
20 | }
21 | ]
22 | }
23 | }
--------------------------------------------------------------------------------
/source/view/work/work_att.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_listview_att",
11 | "width": "480",
12 | "height": "700",
13 | "bgColor": "FFFFFFFF",
14 | "type": "do_ListView",
15 | "footerView": "source://view/kit/fbar.ui",
16 | "headerView": "source://view/kit/hbar.ui",
17 | "isFooterVisible": "true",
18 | "isHeaderVisible": "true",
19 | "templates": "source://view/work/cell0.ui,source://view/work/cell1.ui,source://view/work/cell2.ui,source://view/work/cell3.ui,source://view/work/cell4.ui"
20 | }
21 | ]
22 | }
23 | }
--------------------------------------------------------------------------------
/source/view/inform/seg_cell.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "140",
5 | "height": "50",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "icon",
10 | "x": "25",
11 | "y": "10",
12 | "width": "30",
13 | "height": "30",
14 | "type": "do_ImageView",
15 | "cacheType": "always",
16 | "defaultImage": "source://image/apps@default.png",
17 | "scale": "fillxory"
18 | },
19 | {
20 | "id": "name",
21 | "x": "65",
22 | "y": "5",
23 | "width": "60",
24 | "height": "40",
25 | "type": "do_Label",
26 | "fontSize": "24"
27 | }
28 | ]
29 | }
30 | }
--------------------------------------------------------------------------------
/source/view/inform/select_cell.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "70",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "icon",
10 | "x": "30",
11 | "y": "20",
12 | "width": "30",
13 | "height": "30",
14 | "type": "do_ImageView",
15 | "cacheType": "always",
16 | "defaultImage": "source://image/apps@default.png",
17 | "scale": "fillxory"
18 | },
19 | {
20 | "id": "name",
21 | "x": "75",
22 | "y": "15",
23 | "width": "390",
24 | "height": "40",
25 | "type": "do_Label",
26 | "fontSize": "24"
27 | }
28 | ]
29 | }
30 | }
--------------------------------------------------------------------------------
/source/view/apps/scan/scan.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var open = require("open");
6 |
7 | page.on("back", function(){
8 | app.closePage();
9 | });
10 |
11 | ui("action_back").on("touch", function(){
12 | app.closePage();
13 | });
14 |
15 | var action_start = ui("action_start");
16 | var barc_scan = ui("barc_scan");
17 | var barc_result = "什么都没有扫到,请重新尝试";
18 |
19 | var delay1 = mm("do_Timer");
20 | delay1.delay = 0;
21 | delay1.interval = 1000;
22 | delay1.duration = 1;
23 | delay1.on("tick", function(){
24 | if (this.duration <= 0) {
25 | this.stop();
26 | open.start("source://view/apps/scan/url.ui", barc_result);
27 | }
28 | this.duration--;
29 | });
30 |
31 | barc_scan.start(function(data){
32 | if (!data.value) return;
33 | barc_result = data.value;
34 | delay1.start();
35 | });
--------------------------------------------------------------------------------
/source/app.js:
--------------------------------------------------------------------------------
1 | var deviceone = require("deviceone");
2 | var app = deviceone.sm("do_App");
3 | var anim_button = deviceone.mm("do_Animation", "BUTTONTOUCHDOWN", "app");
4 |
5 | anim_button.alpha({
6 | delay : 0,
7 | duration : 200,
8 | curve : "Linear",
9 | repeatCount : "",
10 | autoReverse : true,
11 | fillAfter : false,
12 | alphaFrom : 1,
13 | alphaTo : .5
14 | });
15 |
16 | anim_button.scale({
17 | delay : 0,
18 | duration : 200,
19 | curve : "Linear",
20 | repeatCount : "",
21 | autoReverse : true,
22 | fillAfter : false,
23 | scaleFromX : 1,
24 | scaleFromY : 1,
25 | scaleToX : .9,
26 | scaleToY : .9,
27 | pivotX : .5,
28 | pivotY : .5
29 | });
30 | var initdata = deviceone.sm("do_InitData");
31 | app.on("loaded", function() {
32 | initdata.copy([ "initdata://AllEmployers.zip", "initdata://oa.db" ],
33 | "data://", function() {
34 | app.openPage("source://view/login.ui");
35 | // this.openPage("source://view/index.ui");
36 | })
37 | });
--------------------------------------------------------------------------------
/source/view/kit/pbar.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "784",
6 | "visible": "false",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "x": "180",
12 | "y": "270",
13 | "width": "120",
14 | "height": "120",
15 | "type": "do_ALayout",
16 | "isStretch": "false",
17 | "layoutAlign": "MiddleCenter",
18 | "views": [
19 | {
20 | "id": "do_progressbar_1",
21 | "x": "30",
22 | "y": "30",
23 | "width": "60",
24 | "height": "60",
25 | "type": "do_ProgressBar"
26 | }
27 | ]
28 | }
29 | ]
30 | }
31 | }
--------------------------------------------------------------------------------
/source/script/verify.js:
--------------------------------------------------------------------------------
1 | var stack = {
2 | phone: /^(\+86)?1\d{10}$/,
3 | email: /^(?:[a-zA-Z0-9]+[_\+\.]?)*[a-zA-Z0-9]+@(?:([a-zA-Z0-9]+[_\-]?)*[a-zA-Z0-9]+\.)+([a-zA-Z]{2,})+$/i,
4 | date: /^((?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29))(\s(?:[01]\d|2[0-3])\:[0-5]\d\:[0-5]\d)?$/,
5 | http: /^(http[s]?|ftp|mms):\/\/?(\w+\.)+\w+[\w_.\/\w]*$/,
6 | double: /^[-]?\d*[\.]?\d*$/,
7 | ZHCN: /^([\u4e00-\u9fa5]+[\.]?)?[\u4e00-\u9fa5]+$/
8 | };
9 |
10 | var run = function(cell){
11 | var v = cell[0];
12 | var p = cell[1];
13 | var m = cell[2];
14 | var pl = p.split(":");
15 | var ml = m.split(":");
16 | var req, patt;
17 | if (pl[0] == "!") {
18 | req = true;
19 | patt = pl[1];
20 | } else {
21 | req = false;
22 | patt = pl[0];
23 | }
24 | if (req && v === "") return [false, ml[0]];
25 | else if (!req && v === "") return [true , ml[0]];
26 | return [stack[patt].test(v) , ml[1]];
27 | };
28 |
29 | module.exports.run = run;
--------------------------------------------------------------------------------
/source/view/apps/cell0.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "160",
5 | "height": "175",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "do_alayout_2",
10 | "width": "160",
11 | "height": "175",
12 | "type": "do_ALayout",
13 | "isStretch": "false",
14 | "layoutAlign": "MiddleCenter",
15 | "views": [
16 | {
17 | "id": "icon",
18 | "x": "30",
19 | "y": "20",
20 | "height": "100",
21 | "type": "do_ImageView"
22 | },
23 | {
24 | "id": "name",
25 | "x": "20",
26 | "y": "128",
27 | "width": "120",
28 | "height": "34",
29 | "type": "do_Label",
30 | "fontSize": "24",
31 | "textAlign": "center"
32 | }
33 | ]
34 | }
35 | ]
36 | }
37 | }
--------------------------------------------------------------------------------
/source/view/apps/detail.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var rootview = ui("$");
5 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
6 | var $U = require("url");
7 |
8 | var action_back = ui("action_back");
9 | var action_exit = ui("action_exit");
10 |
11 | app.backPage = function(){
12 | if (wv_detail.canBack()) {
13 | wv_detail.back();
14 | } else {
15 | app.closePage();
16 | }
17 | };
18 |
19 | page.on("back", function(){
20 | app.backPage();
21 | });
22 |
23 | action_back.on("touch", function(){
24 | app.backPage();
25 | });
26 |
27 | action_exit.on("touch", function(){
28 | app.closePage();
29 | });
30 |
31 | var pagedata = page.getData();
32 | var label_title = ui("label_title");
33 | label_title.text = pagedata.name;
34 |
35 | var wv_detail = ui("wv_detail");
36 | wv_detail.on("start", function(){
37 | pbar.visible = true;
38 | }).on("loaded", function(){
39 | pbar.visible = false;
40 | wv_detail.rebound();
41 | action_exit.visible = wv_detail.canBack();
42 | }).on("pull", function(data){
43 | if (data.state != 2) return;
44 | wv_detail.reload();
45 | }).url = pagedata.url;
46 |
--------------------------------------------------------------------------------
/source/view/inform/cell1.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "120",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "type",
10 | "x": "15",
11 | "y": "15",
12 | "width": "30",
13 | "height": "30",
14 | "type": "do_ImageView",
15 | "cacheType": "always"
16 | },
17 | {
18 | "id": "title",
19 | "x": "60",
20 | "y": "10",
21 | "width": "410",
22 | "height": "40",
23 | "type": "do_Label",
24 | "fontColor": "121212FF",
25 | "fontSize": "24",
26 | "maxLines": "1"
27 | },
28 | {
29 | "id": "describe",
30 | "x": "15",
31 | "y": "50",
32 | "width": "455",
33 | "height": "60",
34 | "type": "do_Label",
35 | "fontColor": "9B9B9BFF",
36 | "fontSize": "22",
37 | "maxLines": "2"
38 | }
39 | ]
40 | }
41 | }
--------------------------------------------------------------------------------
/source/view/work/cell4.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 |
5 | rootview.setMapping({
6 | "icon.tag": "employerId",
7 | "icon.source": "icon",
8 | "name.text": "name",
9 | "message.text": "message",
10 |
11 | "createTime.text": "createTime",
12 | "actionTips.tag": "id",
13 |
14 | "commentList.text": "commentList",
15 | "commentList.visible": "commentVis",
16 |
17 | "img0.source": "img0t",
18 | "img0.width": "img0w",
19 | "img0.height": "img0h",
20 |
21 | "tag": "sources"
22 | });
23 |
24 | var img0 = ui("img0");
25 | img0.on("dataRefreshed", function(){
26 | img0.redraw();
27 | });
28 |
29 | var icon = ui("icon");
30 | var name = ui("name");
31 | icon.on("touch", function(){
32 | page.fire("icon-listen", {id: this.tag, name: name.text});
33 | });
34 |
35 | var actionTips = ui("actionTips");
36 | actionTips.on("touch", function(){
37 | page.fire("comment-listen", {id: this.tag});
38 | });
39 |
40 | var work_imgs = [
41 | ui("img0")
42 | ];
43 |
44 | work_imgs.forEach(function(v, k){
45 | v.on("touch", {index: k}, function(_, e){
46 | page.fire("imgs-listen", {s: JSON.parse(rootview.tag), i: e.data.index})
47 | })
48 | });
--------------------------------------------------------------------------------
/source/view/setting/feedback/feedback.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 | var $U = require("url");
8 |
9 | page.on("back", function(){
10 | app.closePage();
11 | });
12 |
13 | ui("action_back").on("touch", function(){
14 | app.closePage();
15 | });
16 |
17 | var action_ok = ui("action_ok");
18 | var tb_content = ui("tb_content");
19 |
20 | var http = mm("do_Http");
21 | http.url = $U.token($U.url.AddSuggestion);
22 | http.method = "post";
23 | http.timeout = 60000;
24 | http.contentType = "application/json";
25 | http.on("fail", function(data){
26 | $U.fail(data, pbar);
27 | }).on("success", function(data){
28 | pbar.visible = false;
29 | if (!$U.headCodeCheck(data)) return;
30 | nf.alert("您的意见已提交后台,后续我们会有专人进行处理,谢谢!", function(){
31 | app.closePage();
32 | });
33 | });
34 |
35 | action_ok.on("touch", function(){
36 | page.hideKeyboard();
37 | var body = {Message: tb_content.text.trim()};
38 | if (body.Message == "") return nf.toast("内容不可为空");
39 | pbar.visible = true;
40 | http.body = body;
41 | http.request();
42 | });
--------------------------------------------------------------------------------
/source/view/work/cell1.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 |
5 | rootview.setMapping({
6 | "icon.tag": "employerId",
7 | "icon.source": "icon",
8 | "name.text": "name",
9 | "message.text": "message",
10 |
11 | "createTime.text": "createTime",
12 | "actionTips.tag": "id",
13 |
14 | "commentList.text": "commentList",
15 | "commentList.visible": "commentVis",
16 |
17 | "img0.source": "img0t", "img0.visible": "img0v",
18 | "img1.source": "img1t", "img1.visible": "img1v",
19 | "img2.source": "img2t", "img2.visible": "img2v",
20 |
21 | "tag": "sources"
22 | });
23 |
24 | var icon = ui("icon");
25 | var name = ui("name");
26 | icon.on("touch", function(){
27 | page.fire("icon-listen", {id: this.tag, name: name.text});
28 | });
29 |
30 | var actionTips = ui("actionTips");
31 | actionTips.on("touch", function(){
32 | page.fire("comment-listen", {id: this.tag});
33 | });
34 |
35 | var work_imgs = [
36 | ui("img0"),
37 | ui("img1"),
38 | ui("img2")
39 | ];
40 |
41 | work_imgs.forEach(function(v, k){
42 | v.on("touch", {index: k}, function(_, e){
43 | page.fire("imgs-listen", {s: JSON.parse(rootview.tag), i: e.data.index})
44 | })
45 | });
46 |
--------------------------------------------------------------------------------
/source/view/apps/cell1.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "160",
5 | "height": "175",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "do_alayout_2",
10 | "width": "160",
11 | "height": "175",
12 | "type": "do_ALayout",
13 | "isStretch": "false",
14 | "layoutAlign": "MiddleCenter",
15 | "views": [
16 | {
17 | "id": "icon",
18 | "x": "30",
19 | "y": "20",
20 | "height": "100",
21 | "type": "do_ImageView",
22 | "cacheType": "always",
23 | "defaultImage": "source://image/apps@default.png"
24 | },
25 | {
26 | "id": "name",
27 | "x": "20",
28 | "y": "128",
29 | "width": "120",
30 | "height": "34",
31 | "type": "do_Label",
32 | "fontSize": "24",
33 | "textAlign": "center"
34 | }
35 | ]
36 | }
37 | ]
38 | }
39 | }
--------------------------------------------------------------------------------
/source/script/upgrade.js:
--------------------------------------------------------------------------------
1 | var deviceone = require("deviceone");
2 | var global = deviceone.sm("do_Global");
3 | var nf = deviceone.sm("do_Notification");
4 | var device = deviceone.sm("do_Device");
5 | var external = deviceone.sm("do_External");
6 | var $U = require("url");
7 |
8 | var os = device.getInfo().OS == "android" ? 1 : 0;
9 | var version = global.getVersion().ver;
10 |
11 | var request = function(pbar){
12 | var http = deviceone.mm("do_Http");
13 | http.url = $U.url.GetLastVersion + "?" + $U.queryString({type: os});
14 | http.method = "get";
15 | http.timeout = "60000";
16 | http.contentType = "application/json";
17 | http.on("fail", function(data){
18 | if (pbar) $U.fail(data, pbar);
19 | }).on("success", function(data){
20 | if (pbar) pbar.visible = false;
21 | if (data.head.code == "000000") {
22 | if (data.body.version != version) {
23 | nf.confirm("检测到新版本,是否升级?", function(state){
24 | if (state != 1) return;
25 | if (os == 0) data.body.path = "itms-services://?action=download-manifest&url=" + data.body.path;
26 | external.openURL(data.body.path);
27 | });
28 | } else if (pbar) nf.alert("已是最新版本");
29 | } else if (pbar) nf.alert("版本更新失败");
30 | });
31 | if (pbar) pbar.visible = true;
32 | http.request();
33 | };
34 |
35 | module.exports.request = request;
--------------------------------------------------------------------------------
/source/view/forget.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 |
8 | page.on("back", function(){
9 | app.closePage();
10 | });
11 |
12 | ui("action_back").on("touch", function(){
13 | page.hideKeyboard();
14 | app.closePage();
15 | });
16 |
17 | var tf_id = ui("tf_id");
18 | var action_ok = ui("action_ok");
19 |
20 | var $U = require("url");
21 | var forget_http = mm("do_Http");
22 | forget_http.method = "get";
23 | forget_http.timeout = "60000";
24 | forget_http.contentType = "application/json";
25 | forget_http.on("fail", function(data){
26 | $U.fail(data, pbar);
27 | }).on("success", function(data){
28 | pbar.visible = false;
29 | if (!$U.headCodeCheck(data)) return;
30 | nf.alert("密码已经发送到您的公司邮箱,请注意查收~", function(){
31 | app.closePage();
32 | });
33 | });
34 |
35 | var anim_button = mm("do_Animation", "BUTTONTOUCHDOWN", "app");
36 | action_ok.on("touch", function(){
37 | page.hideKeyboard();
38 | var itcode = tf_id.text.trim();
39 | if (itcode == "") return nf.toast("ID不可为空");
40 | pbar.visible = true;
41 | forget_http.url = $U.url.ResetPwd + "?" + $U.queryString({itcode: itcode});
42 | forget_http.request();
43 | }).on("touchDown", function(){
44 | this.animate(anim_button);
45 | });
46 |
--------------------------------------------------------------------------------
/source/view/work/comment.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 | var $U = require("url");
8 |
9 | page.on("back", function(data){
10 | app.closePage(data);
11 | });
12 |
13 | ui("action_back").on("touch", function(){
14 | app.closePage();
15 | });
16 |
17 | var pagedata = page.getData();
18 | var userInfo = global.getMemory("userInfo");
19 |
20 | var add_http = mm("do_Http");
21 | add_http.url = $U.token($U.url.AddWorkCircleComment);
22 | add_http.method = "post";
23 | add_http.timeout = "60000";
24 | add_http.contentType = "application/json";
25 | add_http.on("fail", function(data){
26 | $U.fail(data, pbar);
27 | }).on("success", function(data){
28 | pbar.visible = false;
29 | if (!$U.headCodeCheck(data)) return;
30 | nf.toast("评论成功");
31 | page.fire("back", {work_reply: true})
32 | });
33 |
34 | var action_ok = ui("action_ok");
35 | var tf_comment = ui("tf_comment");
36 | action_ok.on("touch", function(){
37 | page.hideKeyboard();
38 | var body = {
39 | WorkCircleId: pagedata.id,
40 | ReplayEmpId: userInfo.id,
41 | Message: tf_comment.text.trim()
42 | };
43 | if (body.Message == "") return nf.toast("请输入评论内容");
44 | pbar.visible = true;
45 | add_http.body = body;
46 | add_http.request();
47 | });
48 |
--------------------------------------------------------------------------------
/source/view/work/cell2.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 |
5 | rootview.setMapping({
6 | "icon.tag": "employerId",
7 | "icon.source": "icon",
8 | "name.text": "name",
9 | "message.text": "message",
10 |
11 | "createTime.text": "createTime",
12 | "actionTips.tag": "id",
13 |
14 | "commentList.text": "commentList",
15 | "commentList.visible": "commentVis",
16 |
17 | "img0.source": "img0t", "img0.visible": "img0v",
18 | "img1.source": "img1t", "img1.visible": "img1v",
19 | "img2.source": "img2t", "img2.visible": "img2v",
20 | "img3.source": "img3t", "img3.visible": "img3v",
21 | "img4.source": "img4t", "img4.visible": "img4v",
22 | "img5.source": "img5t", "img5.visible": "img5v",
23 |
24 | "tag": "sources"
25 | });
26 |
27 | var icon = ui("icon");
28 | var name = ui("name");
29 | icon.on("touch", function(){
30 | page.fire("icon-listen", {id: this.tag, name: name.text});
31 | });
32 |
33 | var actionTips = ui("actionTips");
34 | actionTips.on("touch", function(){
35 | page.fire("comment-listen", {id: this.tag});
36 | });
37 |
38 | var work_imgs = [
39 | ui("img0"),
40 | ui("img1"),
41 | ui("img2"),
42 | ui("img3"),
43 | ui("img4"),
44 | ui("img5")
45 | ];
46 |
47 | work_imgs.forEach(function(v, k){
48 | v.on("touch", {index: k}, function(_, e){
49 | page.fire("imgs-listen", {s: JSON.parse(rootview.tag), i: e.data.index})
50 | })
51 | });
52 |
--------------------------------------------------------------------------------
/source/view/apps/add.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 |
8 | page.on("back", function(data){
9 | app.closePage(data);
10 | });
11 |
12 | ui("action_back").on("touch", function(){
13 | app.closePage();
14 | });
15 |
16 | var action_ok = ui("action_ok");
17 | var add_name = ui("add_name");
18 | var add_url = ui("add_url");
19 |
20 | var $U = require("url");
21 | var add_http = mm("do_Http");
22 | add_http.url = $U.token($U.url.AddApplication);
23 | add_http.method = "post";
24 | add_http.timeout = "60000";
25 | add_http.contentType = "application/json";
26 | add_http.on("fail", function(data){
27 | $U.fail(data, pbar);
28 | }).on("success", function(data){
29 | pbar.visible = false;
30 | if (!$U.headCodeCheck(data)) return;
31 | nf.toast("添加成功");
32 | page.fire("back", {apps_add: true});
33 | });
34 |
35 | var verify = require("verify");
36 | action_ok.on("touch", function(){
37 | page.hideKeyboard();
38 | var body = {
39 | Name: add_name.text.trim(),
40 | Url: add_url.text.trim()
41 | };
42 | if (body.Name == "") return nf.toast("应用名称不可为空");
43 | var cell = [body.Url, "!:http", "应用网址不可为空:请输入正确的网址"];
44 | var ver = verify.run(cell);
45 | if (!ver[0]) return nf.toast(ver[1]);
46 | pbar.visible = true;
47 | add_http.body = body;
48 | add_http.request();
49 | });
50 |
--------------------------------------------------------------------------------
/source/view/kit/menu.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "visible": "false",
7 | "bgColor": "00000088",
8 | "type": "do_ALayout",
9 | "views": [
10 | {
11 | "id": "do_linearlayout_1",
12 | "y": "714",
13 | "width": "480",
14 | "height": "141",
15 | "bgColor": "FFFFFFFF",
16 | "type": "do_LinearLayout",
17 | "views": [
18 | {
19 | "id": "action_cap",
20 | "width": "480",
21 | "height": "70",
22 | "type": "do_Button",
23 | "fontSize": "24",
24 | "text": "拍照"
25 | },
26 | {
27 | "id": "do_line_1",
28 | "width": "480",
29 | "height": "1",
30 | "bgColor": "DBDBDBFF",
31 | "type": "do_Label"
32 | },
33 | {
34 | "id": "action_abl",
35 | "width": "480",
36 | "height": "70",
37 | "type": "do_Button",
38 | "fontSize": "24",
39 | "text": "相册"
40 | }
41 | ]
42 | }
43 | ]
44 | }
45 | }
--------------------------------------------------------------------------------
/source/view/inform/detail.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var rootview = ui("$");
5 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
6 | var $U = require("url");
7 | var open = require("open");
8 |
9 | var action_back = ui("action_back");
10 | var action_exit = ui("action_exit");
11 |
12 | app.backPage = function(){
13 | if (wv_detail.canBack()) {
14 | wv_detail.back();
15 | } else {
16 | app.closePage();
17 | }
18 | };
19 |
20 | page.on("back", function(){
21 | app.backPage();
22 | });
23 |
24 | action_back.on("touch", function(){
25 | app.backPage();
26 | });
27 |
28 | action_exit.on("touch", function(){
29 | app.closePage();
30 | });
31 |
32 | var pagedata = page.getData();
33 | var label_title = ui("label_title");
34 | label_title.text = pagedata.title;
35 |
36 | var action_comment = ui("action_comment");
37 | action_comment.visible = pagedata.isComment;
38 | action_comment.on("touch", function(){
39 | open.start("source://view/inform/comment.ui", pagedata);
40 | });
41 |
42 | var wv_detail = ui("wv_detail");
43 | wv_detail.on("start", function(){
44 | pbar.visible = true;
45 | }).on("loaded", function(){
46 | pbar.visible = false;
47 | action_exit.visible = wv_detail.canBack();
48 | wv_detail.rebound();
49 | }).on("pull", function(data){
50 | if (data.state != 2) return;
51 | wv_detail.reload();
52 | }).url = pagedata.htmlPath ? $U.prefix + pagedata.htmlPath : "source://view/inform/detail.do.html";
53 |
--------------------------------------------------------------------------------
/source/view/inform/cell0.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "120",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "icon",
10 | "x": "15",
11 | "y": "15",
12 | "width": "110",
13 | "height": "90",
14 | "type": "do_ImageView",
15 | "cacheType": "always",
16 | "defaultImage": "source://image/inform@default.png"
17 | },
18 | {
19 | "id": "type",
20 | "x": "140",
21 | "y": "15",
22 | "width": "30",
23 | "height": "30",
24 | "type": "do_ImageView",
25 | "cacheType": "always"
26 | },
27 | {
28 | "id": "title",
29 | "x": "180",
30 | "y": "10",
31 | "width": "290",
32 | "height": "40",
33 | "type": "do_Label",
34 | "fontColor": "121212FF",
35 | "fontSize": "24",
36 | "maxLines": "1"
37 | },
38 | {
39 | "id": "describe",
40 | "x": "140",
41 | "y": "50",
42 | "width": "330",
43 | "height": "55",
44 | "type": "do_Label",
45 | "fontColor": "9B9B9BFF",
46 | "fontSize": "22",
47 | "maxLines": "2"
48 | }
49 | ]
50 | }
51 | }
--------------------------------------------------------------------------------
/source/view/inform/cell2.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "120",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "type",
10 | "x": "15",
11 | "y": "15",
12 | "width": "30",
13 | "height": "30",
14 | "type": "do_ImageView",
15 | "cacheType": "always"
16 | },
17 | {
18 | "id": "title",
19 | "x": "60",
20 | "y": "10",
21 | "width": "410",
22 | "height": "40",
23 | "type": "do_Label",
24 | "fontColor": "121212FF",
25 | "fontSize": "24",
26 | "maxLines": "1"
27 | },
28 | {
29 | "id": "describe",
30 | "x": "15",
31 | "y": "50",
32 | "width": "360",
33 | "height": "60",
34 | "type": "do_Label",
35 | "fontColor": "9B9B9BFF",
36 | "fontSize": "22",
37 | "maxLines": "2"
38 | },
39 | {
40 | "id": "comment",
41 | "x": "380",
42 | "y": "75",
43 | "width": "90",
44 | "height": "30",
45 | "type": "do_Label",
46 | "fontColor": "9B9B9BFF",
47 | "fontSize": "22",
48 | "textAlign": "right"
49 | }
50 | ]
51 | }
52 | }
--------------------------------------------------------------------------------
/source/view/contact/cell0.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "125",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "icon",
10 | "x": "15",
11 | "y": "27",
12 | "width": "70",
13 | "height": "70",
14 | "type": "do_ImageView",
15 | "cacheType": "temporary",
16 | "defaultImage": "source://image/user@avatar.png",
17 | "scale": "fillxory"
18 | },
19 | {
20 | "id": "nameP",
21 | "x": "99",
22 | "y": "10",
23 | "width": "370",
24 | "height": "34",
25 | "type": "do_Label",
26 | "fontSize": "24",
27 | "maxLines": "1"
28 | },
29 | {
30 | "id": "itcodeP",
31 | "x": "99",
32 | "y": "50",
33 | "width": "370",
34 | "height": "30",
35 | "type": "do_Label",
36 | "fontColor": "666666FF",
37 | "fontSize": "20",
38 | "maxLines": "1"
39 | },
40 | {
41 | "id": "departname",
42 | "x": "99",
43 | "y": "85",
44 | "width": "370",
45 | "height": "30",
46 | "type": "do_Label",
47 | "fontColor": "666666FF",
48 | "fontSize": "20",
49 | "maxLines": "1"
50 | }
51 | ]
52 | }
53 | }
--------------------------------------------------------------------------------
/source/view/work/cell3.ui.js:
--------------------------------------------------------------------------------
1 | var rootview = ui("$");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 |
5 | rootview.setMapping({
6 | "icon.tag": "employerId",
7 | "icon.source": "icon",
8 | "name.text": "name",
9 | "message.text": "message",
10 |
11 | "createTime.text": "createTime",
12 | "actionTips.tag": "id",
13 |
14 | "commentList.text": "commentList",
15 | "commentList.visible": "commentVis",
16 |
17 | "img0.source": "img0t", "img0.visible": "img0v",
18 | "img1.source": "img1t", "img1.visible": "img1v",
19 | "img2.source": "img2t", "img2.visible": "img2v",
20 | "img3.source": "img3t", "img3.visible": "img3v",
21 | "img4.source": "img4t", "img4.visible": "img4v",
22 | "img5.source": "img5t", "img5.visible": "img5v",
23 | "img6.source": "img6t", "img6.visible": "img6v",
24 | "img7.source": "img7t", "img7.visible": "img7v",
25 | "img8.source": "img8t", "img8.visible": "img8v",
26 |
27 | "tag": "sources"
28 | });
29 |
30 | var icon = ui("icon");
31 | var name = ui("name");
32 | icon.on("touch", function(){
33 | page.fire("icon-listen", {id: this.tag, name: name.text});
34 | });
35 |
36 | var actionTips = ui("actionTips");
37 | actionTips.on("touch", function(){
38 | page.fire("comment-listen", {id: this.tag});
39 | });
40 |
41 | var work_imgs = [
42 | ui("img0"),
43 | ui("img1"),
44 | ui("img2"),
45 | ui("img3"),
46 | ui("img4"),
47 | ui("img5"),
48 | ui("img6"),
49 | ui("img7"),
50 | ui("img8")
51 | ];
52 |
53 | work_imgs.forEach(function(v, k){
54 | v.on("touch", {index: k}, function(_, e){
55 | page.fire("imgs-listen", {s: JSON.parse(rootview.tag), i: e.data.index})
56 | })
57 | });
58 |
--------------------------------------------------------------------------------
/source/view/index.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 |
6 | var canBack = false;
7 | var delay3 = mm("do_Timer");
8 | delay3.delay = 3000;
9 | delay3.interval = 1000;
10 | delay3.on("tick", function(){
11 | this.stop();
12 | canBack = false;
13 | });
14 |
15 | page.on("back", function(){
16 | if (canBack) {
17 | global.exit();
18 | } else {
19 | nf.toast("再按一次退出");
20 | canBack = true;
21 | delay3.start();
22 | }
23 | });
24 |
25 | var main_shower = ui("main_shower");
26 | var action_alys = [ui("inform"), ui("work"), ui("apps"), ui("contact"), ui("message")];
27 | var action_imgs = [ui("img_0"), ui("img_1"), ui("img_2"), ui("img_3"), ui("img_4")];
28 | var action_lbs = [ui("lb_0"), ui("lb_1"), ui("lb_2"), ui("lb_3"), ui("lb_4")];
29 | var v, path = [], prev = {img: action_imgs[0], lb: action_lbs[0]};
30 | for (var i = 0, len = action_alys.length; i < len; i++) {
31 | v = action_alys[i];
32 | path.push({
33 | id: v.id,
34 | path: "source://view/" + v.id + "/" + v.id + ".ui"
35 | });
36 | v.img = action_imgs[i];
37 | v.lb = action_lbs[i];
38 | v.on("touch", function(){
39 | prev.img.source = prev.img.source.replace("_d", "");
40 | prev.lb.fontColor = "000000FF";
41 | this.img.source = "source://image/action@" + this.id + "_d.png";
42 | this.lb.fontColor = "E03E3FFF";
43 | prev.img = this.img;
44 | prev.lb = this.lb;
45 | main_shower.showView(this.id);
46 | });
47 | }
48 | main_shower.addViews(path);
49 |
50 | page.on("loaded", function(){
51 | main_shower.showView("inform");
52 | }).on("index-listen", function(data){
53 | ui(data.view).fire("touch");
54 | });
55 |
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_ImageBrowser.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_ImageBrowser",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "图片预览",
6 | "Version": "Internal",
7 | "Description": "这个组件用于浏览大量网络或本地图片,图片路径可以http://链接或本地data://,支持放大后缩放原图,多图片支持左右滑动预览,进入浏览界面单击一下屏幕退出",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_ImageBrowser/图片预览.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [
31 | {
32 | "ID": "longTouch",
33 | "Description": "长按预览图片触发",
34 | "ReturnType": "Node",
35 | "ReturnDesc": "当前图片的index值和图片的source,如['index':'','source':'']"
36 | }
37 | ],
38 | "syncMethodes": [
39 | {
40 | "ID": "show",
41 | "Name": "预览",
42 | "Description": "打开预览,图片底部显示当前图片索引和总图片数",
43 | "ReturnType": "",
44 | "ReturnDesc": "",
45 | "Paras": [
46 | {
47 | "ID": "data",
48 | "Name": "",
49 | "Type": "Node",
50 | "Required": 1,
51 | "DefaultValue": "",
52 | "Description": "预览图片传递数据结构[{ source : '', init : ''},{source :'' , init : ''}, ..... ]其中source 为网络原图,init为缩略图"
53 | },
54 | {
55 | "ID": "index",
56 | "Name": "",
57 | "Type": "Number",
58 | "Required": 1,
59 | "DefaultValue": "0",
60 | "Description": "设置当前预览图片索引值,默认为0"
61 | }
62 | ]
63 | }
64 | ],
65 | "asyncMethodes": []
66 | }
--------------------------------------------------------------------------------
/source/view/apps/cell2.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "160",
5 | "height": "175",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "do_alayout_2",
10 | "width": "160",
11 | "height": "175",
12 | "type": "do_ALayout",
13 | "isStretch": "false",
14 | "layoutAlign": "MiddleCenter",
15 | "views": [
16 | {
17 | "id": "icon",
18 | "x": "30",
19 | "y": "20",
20 | "height": "100",
21 | "type": "do_ImageView",
22 | "cacheType": "always",
23 | "defaultImage": "source://image/apps@default.png"
24 | },
25 | {
26 | "id": "name",
27 | "x": "20",
28 | "y": "128",
29 | "width": "120",
30 | "height": "34",
31 | "type": "do_Label",
32 | "fontSize": "24",
33 | "textAlign": "center"
34 | },
35 | {
36 | "id": "action_delete",
37 | "x": "105",
38 | "y": "5",
39 | "width": "40",
40 | "height": "40",
41 | "type": "do_ImageView",
42 | "cacheType": "always",
43 | "enabled": "true",
44 | "source": "source://image/apps@delete.png"
45 | }
46 | ]
47 | }
48 | ]
49 | }
50 | }
--------------------------------------------------------------------------------
/source/view/setting/edit/editpwd.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 |
8 | page.on("back", function(){
9 | app.closePage();
10 | });
11 |
12 | ui("action_back").on("touch", function(){
13 | app.closePage();
14 | });
15 |
16 | var tf_old = ui("tf_old");
17 | var tf_new = ui("tf_new");
18 | var tf_again = ui("tf_again");
19 | var action_ok = ui("action_ok");
20 |
21 | var $U = require("url");
22 | var http = mm("do_Http");
23 | http.url = $U.token($U.url.ChangePwd);
24 | http.method = "post";
25 | http.timeout = "60000";
26 | http.contentType = "application/json";
27 | http.on("fail", function(data){
28 | $U.fail(data, pbar);
29 | }).on("success", function(data){
30 | pbar.visible = false;
31 | if (!$U.headCodeCheck(data)) return;
32 | nf.alert("密码修改成功", function(){
33 | app.closePage();
34 | });
35 | });
36 |
37 | var anim_button = mm("do_Animation", "BUTTONTOUCHDOWN", "app");
38 | action_ok.on("touch", function(){
39 | page.hideKeyboard();
40 | var body = {
41 | PassWord: tf_old.text.trim(),
42 | NewPassWord: tf_new.text.trim()
43 | };
44 | if (body.PassWord == "") return nf.toast("原密码不可为空");
45 | if (body.NewPassWord == "") return nf.toast("新密码不可为空");
46 | if (body.NewPassWord == body.PassWord) return nf.toast("新密码不能和原密码一样");
47 | var newPassWordAgain = tf_again.text.trim();
48 | if (newPassWordAgain == "") return nf.toast("确认密码不可为空");
49 | if (newPassWordAgain != body.NewPassWord) return nf.toast("两次密码不一致");
50 | pbar.visible = true;
51 | http.body = body;
52 | http.request();
53 | }).on("touchDown", function(){
54 | this.animate(anim_button);
55 | });
56 |
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_ProgressBar.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_ProgressBar",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "进度条",
6 | "Version": "Internal",
7 | "Description": "可以设置基于值填充的进度条和显示重复模式的进度条",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/D/20160121/do_ProgressBar/进度条progress.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "progress",
32 | "Name": "进度值",
33 | "Type": "Number",
34 | "DefaultValue": "无",
35 | "EditType": "1",
36 | "Group": "",
37 | "Description": "设置进度值,取值范围是0-100的Number(style=horizontal有效)",
38 | "Design": {
39 | "Type": "Text",
40 | "Data": []
41 | }
42 | },
43 | {
44 | "ID": "style",
45 | "Name": "进度条样式",
46 | "Type": "String",
47 | "DefaultValue": "normal",
48 | "EditType": "0",
49 | "Group": "",
50 | "Description": "进度条样式可以是以下几种类型:horizontal,large,small,normal",
51 | "Design": {
52 | "Type": "List",
53 | "Data": [
54 | {
55 | "id": "horizontal",
56 | "value": "水平"
57 | },
58 | {
59 | "id": "large",
60 | "value": "大"
61 | },
62 | {
63 | "id": "small",
64 | "value": "小"
65 | },
66 | {
67 | "id": "normal",
68 | "value": "普通"
69 | }
70 | ]
71 | }
72 | }
73 | ],
74 | "Events": [],
75 | "syncMethodes": [],
76 | "asyncMethodes": []
77 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_BarcodeView.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_BarcodeView",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "二维码扫描视图",
6 | "Version": "Internal",
7 | "Description": "能设置view的基本属性,宽高等,扫描狂内有矩形校正区域,扫描时有简单的动画显示,支持普通的一维码、二维码(包括QR码、DM码)并获取内容",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/D/20160121/do_BarcodeView/QR二维码.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "scanArea",
32 | "Name": "扫描的区域",
33 | "Type": "String",
34 | "DefaultValue": "",
35 | "EditType": "1",
36 | "Group": "",
37 | "Description": "设置扫描区域的位置和宽高,x,y,width,height,中间用逗号隔开;扫描区域不建议设置超出组件本身宽高和范围;默认值取控件的一半宽高,居中显示",
38 | "Design": {
39 | "Type": "Richtext",
40 | "Data": []
41 | }
42 | }
43 | ],
44 | "Events": [],
45 | "syncMethodes": [
46 | {
47 | "ID": "flash",
48 | "Name": "开关闪光灯",
49 | "Description": "开关手机系统闪光灯",
50 | "ReturnType": "",
51 | "ReturnDesc": "",
52 | "Paras": [
53 | {
54 | "ID": "status",
55 | "Name": "闪光灯状态",
56 | "Type": "String",
57 | "Required": 0,
58 | "DefaultValue": "",
59 | "Description": "闪光灯状态,支持两种状态:on(开启)、off(关闭)"
60 | }
61 | ]
62 | }
63 | ],
64 | "asyncMethodes": [
65 | {
66 | "ID": "start",
67 | "Name": "启动扫描",
68 | "Description": "条形码扫描框第1次加载时,默认启动扫描,在扫描成功时会自动停止,需要再次调用该方法启用扫描功能",
69 | "ReturnType": "Node",
70 | "ReturnDesc": "扫描成功回调会返回一个JSON数据参数给onscaned对应的回调函数,node格式:{code:'',value:''}",
71 | "Paras": []
72 | }
73 | ]
74 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_Network.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_Network",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "网络状态类",
6 | "Version": "Internal",
7 | "Description": "能获取当前手机端的网络状态,监听网络状态的变化",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_Network/network.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [
31 | {
32 | "ID": "changed",
33 | "Description": "网络状态发生变化的回调方法",
34 | "ReturnType": "String",
35 | "ReturnDesc": "返回以下枚举类型的一种:'wifi'-wifi网络,'2G/3G/4G'-2G、3G或者4G,'none'-没有网络连接,'unknown'-未知网络连接"
36 | }
37 | ],
38 | "syncMethodes": [
39 | {
40 | "ID": "getIP",
41 | "Name": "获取移动终端ip地址",
42 | "Description": "获取当前的ip地址",
43 | "ReturnType": "String",
44 | "ReturnDesc": "当前的ip地址",
45 | "Paras": []
46 | },
47 | {
48 | "ID": "getMACAddress",
49 | "Name": "获取物理地址",
50 | "Description": "当前设备的物理地址",
51 | "ReturnType": "String",
52 | "ReturnDesc": "返回当前设备的物理地址,windows平台返回的地址与直接在手机上查看的不一致,但也表示的是唯一地址;iOS平台不支持",
53 | "Paras": []
54 | },
55 | {
56 | "ID": "getStatus",
57 | "Name": "获取当前网络状态",
58 | "Description": "获取手机端当前处于的网络环境",
59 | "ReturnType": "String",
60 | "ReturnDesc": "以下枚举类型的一种:'wifi'-wifi网络,'2G/3G/4G'-2G、3G或者4G,'none'-没有网络连接,'unknown'-未知网络连接",
61 | "Paras": []
62 | },
63 | {
64 | "ID": "openWifiSetting",
65 | "Name": "打开无线网络连接界面",
66 | "Description": "打开无线网络连接界面,选择网络连接",
67 | "ReturnType": "",
68 | "ReturnDesc": "",
69 | "Paras": []
70 | }
71 | ],
72 | "asyncMethodes": []
73 | }
--------------------------------------------------------------------------------
/source/view/message/cell0.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "100",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "UserLogo",
10 | "x": "15",
11 | "y": "15",
12 | "width": "70",
13 | "height": "70",
14 | "type": "do_ImageView",
15 | "cacheType": "temporary",
16 | "defaultImage": "source://image/user@avatar.png",
17 | "scale": "fillxory"
18 | },
19 | {
20 | "id": "NickName",
21 | "x": "100",
22 | "y": "15",
23 | "width": "165",
24 | "height": "30",
25 | "type": "do_Label",
26 | "fontSize": "24"
27 | },
28 | {
29 | "id": "Time",
30 | "x": "265",
31 | "y": "15",
32 | "width": "205",
33 | "height": "30",
34 | "type": "do_Label",
35 | "fontColor": "666666FF",
36 | "fontSize": "20",
37 | "textAlign": "right"
38 | },
39 | {
40 | "id": "LastMsg",
41 | "x": "100",
42 | "y": "55",
43 | "width": "365",
44 | "height": "30",
45 | "type": "do_Label",
46 | "fontColor": "B0B0B0FF",
47 | "fontSize": "20"
48 | },
49 | {
50 | "id": "Status",
51 | "x": "70",
52 | "y": "10",
53 | "width": "24",
54 | "height": "24",
55 | "visible": "false",
56 | "bgColor": "E03E3FFF",
57 | "type": "do_Button",
58 | "fontColor": "FFFFFFFF",
59 | "fontSize": "16",
60 | "radius": "12",
61 | "text": "0"
62 | }
63 | ]
64 | }
65 | }
--------------------------------------------------------------------------------
/source/view/inform/select.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "筛选",
43 | "textAlign": "center"
44 | }
45 | ]
46 | },
47 | {
48 | "id": "do_listview",
49 | "y": "70",
50 | "width": "480",
51 | "height": "784",
52 | "type": "do_ListView",
53 | "templates": "source://view/inform/select_cell.ui"
54 | }
55 | ]
56 | }
57 | }
--------------------------------------------------------------------------------
/source/view/setting/about/about.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "FFFFFFFF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "关于",
43 | "textAlign": "center"
44 | }
45 | ]
46 | },
47 | {
48 | "id": "webview",
49 | "y": "70",
50 | "width": "480",
51 | "height": "784",
52 | "type": "do_WebView",
53 | "url": "source://view/setting/about/about.do.html"
54 | }
55 | ]
56 | }
57 | }
--------------------------------------------------------------------------------
/source/view/work/employer.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var imgbrowser = sm("do_ImageBrowser");
6 | var rootview = ui("$");
7 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
8 | var $U = require("url");
9 |
10 | page.on("back", function(){
11 | app.closePage();
12 | });
13 |
14 | ui("action_back").on("touch", function(){
15 | app.closePage();
16 | });
17 |
18 | var pagedata = page.getData();
19 | var label_title = ui("label_title");
20 | label_title.text = pagedata.name;
21 |
22 | var listview = ui("do_listview");
23 | var listdata = mm("do_ListData");
24 | listview.bindItems(listdata);
25 | var listcache = sm("do_DataCache");
26 | var chchekey = "cache_work_all";
27 |
28 | var work_http = mm("do_Http");
29 | var tokenUrl = $U.token($U.url.GetWorkCircleForEmployer) + "&";
30 | work_http.method = "get";
31 | work_http.timeout = "60000";
32 | work_http.contentType = "application/json";
33 | work_http.on("fail", function(data){
34 | $U.fail(data, pbar, listview);
35 | }).on("success", function(data){
36 | if (pbar.visible) pbar.visible = false;
37 | else listview.rebound();
38 | if (!$U.headCodeCheck(data)) return;
39 | data = $U.work_format(data.body);
40 | listdata.removeAll();
41 | listdata.addData(data);
42 | listview.refreshItems();
43 | listcache.saveData({key: chchekey, value: listdata.getRange(0)});
44 | if (data.length == 0) nf.toast("暂无内容");
45 | });
46 |
47 | var body = {employerId: pagedata.id};
48 | var binddata = function(body){
49 | work_http.url = tokenUrl + $U.queryString(body);
50 | work_http.request();
51 | };
52 |
53 | var datacache = listcache.loadData({key: chchekey});
54 | if (datacache) {
55 | listdata.addData(datacache);
56 | listview.refreshItems();
57 | binddata(body);
58 | } else {
59 | pbar.visible = true;
60 | binddata(body);
61 | }
62 |
63 | page.on("imgs-listen", function(data){
64 | imgbrowser.show(data.s, data.i);
65 | });
66 |
67 | listview.on("pull", function(data){
68 | if (data.state != 2) return;
69 | binddata(body);
70 | });
71 |
--------------------------------------------------------------------------------
/source/view/work/work_att.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 0));
7 | var $U = require("url");
8 |
9 | var isMore = false;
10 | var listview = ui("do_listview_att");
11 | var listdata = mm("do_ListData");
12 | listview.bindItems(listdata);
13 | var listcache = sm("do_DataCache");
14 | var chchekey = "cache_work_att";
15 |
16 | var work_http = mm("do_Http");
17 | var tokenUrl = $U.token($U.url.GetWorkCircleList) + "&";
18 | work_http.method = "get";
19 | work_http.timeout = "60000";
20 | work_http.contentType = "application/json";
21 | work_http.on("fail", function(data){
22 | $U.fail(data, pbar, listview);
23 | }).on("success", function(data){
24 | if (pbar.visible) pbar.visible = false;
25 | else listview.rebound();
26 | if (!$U.headCodeCheck(data)) return;
27 | data = $U.work_format(data.body);
28 | if (!isMore) listdata.removeAll();
29 | listdata.addData(data);
30 | listview.refreshItems();
31 | listcache.saveData({key: chchekey, value: listdata.getRange(0)});
32 | if (data.length == 0) nf.toast("暂无关注");
33 | });
34 |
35 | var body = {isAttention: true, page: 1};
36 | var binddata = function(body){
37 | if (isMore) body.page++;
38 | else body.page = 1;
39 | work_http.url = tokenUrl + $U.queryString(body);
40 | work_http.request();
41 | };
42 |
43 | var datacache = listcache.loadData({key: chchekey});
44 | if (datacache) {
45 | listdata.addData(datacache);
46 | listview.refreshItems();
47 | binddata(body);
48 | } else {
49 | pbar.visible = true;
50 | binddata(body);
51 | }
52 |
53 | page.on("result", function(data){
54 | if (data.work_att || data.work_reply) {
55 | pbar.visible = true;
56 | isMore = false;
57 | binddata(body);
58 | }
59 | });
60 |
61 | listview.on("pull", function(data){
62 | if (data.state != 2) return;
63 | isMore = false;
64 | binddata(body);
65 | }).on("push", function(data, e){
66 | if (data.state != 2) return;
67 | isMore = true;
68 | binddata(body);
69 | });
70 |
--------------------------------------------------------------------------------
/source/view/work/work_all.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 0));
7 | var $U = require("url");
8 |
9 | var isMore = false;
10 | var listview = ui("do_listview_all");
11 | var listdata = mm("do_ListData");
12 | listview.bindItems(listdata);
13 | var listcache = sm("do_DataCache");
14 | var chchekey = "cache_work_all";
15 |
16 | var work_http = mm("do_Http");
17 | var tokenUrl = $U.token($U.url.GetWorkCircleList) + "&";
18 | work_http.method = "get";
19 | work_http.timeout = "60000";
20 | work_http.contentType = "application/json";
21 | work_http.on("fail", function(data){
22 | $U.fail(data, pbar, listview);
23 | }).on("success", function(data){
24 | if (pbar.visible) pbar.visible = false;
25 | else listview.rebound();
26 | if (!$U.headCodeCheck(data)) return;
27 | data = $U.work_format(data.body);
28 | if (!isMore) listdata.removeAll();
29 | listdata.addData(data);
30 | listview.refreshItems();
31 | listcache.saveData({key: chchekey, value: listdata.getRange(0)});
32 | if (data.length == 0) nf.toast("暂无内容");
33 | });
34 |
35 | var body = {isAttention: false, page: 1};
36 | var binddata = function(body){
37 | if (isMore) body.page++;
38 | else body.page = 1;
39 | work_http.url = tokenUrl + $U.queryString(body);
40 | work_http.request();
41 | };
42 |
43 | var datacache = listcache.loadData({key: chchekey});
44 | if (datacache) {
45 | listdata.addData(datacache);
46 | listview.refreshItems();
47 | binddata(body);
48 | } else {
49 | pbar.visible = true;
50 | binddata(body);
51 | }
52 |
53 | page.on("result", function(data){
54 | if (data.work_add || data.work_reply) {
55 | pbar.visible = true;
56 | isMore = false;
57 | binddata(body);
58 | }
59 | });
60 |
61 | listview.on("pull", function(data){
62 | if (data.state != 2) return;
63 | isMore = false;
64 | binddata(body);
65 | }).on("push", function(data, e){
66 | if (data.state != 2) return;
67 | isMore = true;
68 | binddata(body);
69 | });
70 |
71 |
--------------------------------------------------------------------------------
/source/view/inform/inform.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var rootview = ui("$");
5 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
6 | var $U = require("url");
7 | var open = require("open");
8 |
9 | var segmentview = ui("do_segmentview");
10 | var segmentdata = mm("do_ListData");
11 | segmentview.bindItems(segmentdata);
12 |
13 | var slideview = ui("do_slideview");
14 | var slidedata = mm("do_ListData");
15 | slideview.bindItems(slidedata);
16 |
17 | var type_all = [
18 | {icon: "source://image/inform@all.png", name: "全部", id: "", fontColor: "E03E3FFF"}
19 | ];
20 | var type_http = mm("do_Http");
21 | type_http.url = $U.token($U.url.GetInformationType);
22 | type_http.method = "get";
23 | type_http.timeout = "60000";
24 | type_http.contentType = "application/json";
25 | type_http.on("fail", function(data){
26 | $U.fail(data, pbar);
27 | }).on("success", function(data){
28 | if (pbar.visible) pbar.visible = false;
29 | if (!$U.headCodeCheck(data)) return;
30 | data.body.forEach(function(v, k){
31 | v.icon = $U.prefix + v.icon;
32 | v.fontColor = "000000FF";
33 | });
34 | type_all = type_all.concat(data.body);
35 | segmentdata.removeAll();
36 | segmentdata.addData(type_all);
37 | segmentview.refreshItems();
38 | slidedata.removeAll();
39 | slidedata.addData(type_all);
40 | slideview.refreshItems();
41 | });
42 | pbar.visible = true;
43 | type_http.request();
44 |
45 | segmentview.on("indexChanged", function(index){
46 | slideview.set({index: index});
47 | });
48 |
49 | slideview.on("indexChanged", function(index){
50 | type_all.forEach(function(v, k){
51 | if (k == index) v.fontColor = "E03E3FFF";
52 | else v.fontColor = "000000FF";
53 | });
54 | segmentdata.removeAll();
55 | segmentdata.addData(type_all);
56 | segmentview.refreshItems();
57 | segmentview.set({index: index});
58 | });
59 |
60 | page.on("result", function(data){
61 | if (!data.inform_select) return;
62 | slideview.set({index: data.index});
63 | });
64 |
65 | ui("action_select").on("touch", function(){
66 | open.start("source://view/inform/select.ui", type_all);
67 | });
68 |
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_Camera.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_Camera",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "照相机",
6 | "Version": "Internal",
7 | "Description": "启动系统的相机拍照获取照片\r\n",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_Camera/照相.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "iOS7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [],
31 | "syncMethodes": [],
32 | "asyncMethodes": [
33 | {
34 | "ID": "capture",
35 | "Name": "拍照、获取照片",
36 | "Description": "",
37 | "ReturnType": "String",
38 | "ReturnDesc": "执行方法后,弹出系统相机,拍照后,图片的原始分辨率通常比较高。拍完的图片缺省会另存到data://temp/do_Camera/目录下可以通过用户传入width,height来裁剪图片大小。如果设置的宽高比例和真实图片宽高比例不一致的话,图片会自动平铺拉伸。width和height均为-1时保持图片的原始宽高不变;width或height有任何一个值为-1,则保持图片的原始宽高比不变 ,以不为-1的那个值做为基准, 保持原图的宽高比。也可以通过设置清晰度quality来使图片文件变小",
39 | "Paras": [
40 | {
41 | "ID": "width",
42 | "Name": "裁剪后的图片的宽度",
43 | "Type": "Number",
44 | "Required": 0,
45 | "DefaultValue": "",
46 | "Description": "不设置表示原始大小"
47 | },
48 | {
49 | "ID": "height",
50 | "Name": "裁剪后的图片的高度 ",
51 | "Type": "Number",
52 | "Required": 0,
53 | "DefaultValue": "",
54 | "Description": "不设置表示原始大小"
55 | },
56 | {
57 | "ID": "quality",
58 | "Name": "清晰度1-100",
59 | "Type": "Number",
60 | "Required": 0,
61 | "DefaultValue": "100",
62 | "Description": "100表示原始的图片质量,清晰度越低,图片文件大小越小。windows平台不支持"
63 | },
64 | {
65 | "ID": "iscut",
66 | "Name": "是否启动中间取景界面",
67 | "Type": "Bool",
68 | "Required": 0,
69 | "DefaultValue": "false",
70 | "Description": "如果这个值为true的话,拍照结束后会出现一个中间的取景界面,有一个矩形框让用户选择局部区域;windowsPhone不支持"
71 | }
72 | ]
73 | }
74 | ]
75 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_Timer.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_Timer",
3 | "IsContainer": "0",
4 | "Type": "MM",
5 | "Name": "定时器",
6 | "Version": "Internal",
7 | "Description": "定时器,功能是在指定的时间间隔内反复触发指定任务事件",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/R/20150624/3c69fba1-ad6d-475f-86d2-b57481bf2496.png",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "delay",
32 | "Name": "延时启动时间",
33 | "Type": "Number",
34 | "DefaultValue": "",
35 | "EditType": "1",
36 | "Group": "",
37 | "Description": "从现在起延迟多长时间开始启动,单位为毫秒",
38 | "Design": {
39 | "Type": "Text",
40 | "Data": []
41 | }
42 | },
43 | {
44 | "ID": "interval",
45 | "Name": "间隔时间",
46 | "Type": "Number",
47 | "DefaultValue": "1000",
48 | "EditType": "1",
49 | "Group": "",
50 | "Description": "定时器将每隔指定豪秒时间触发一次事件,单位毫秒,默认为1000",
51 | "Design": {
52 | "Type": "Text",
53 | "Data": []
54 | }
55 | }
56 | ],
57 | "Events": [
58 | {
59 | "ID": "tick",
60 | "Description": "固定间隔被调用触发",
61 | "ReturnType": "String",
62 | "ReturnDesc": ""
63 | }
64 | ],
65 | "syncMethodes": [
66 | {
67 | "ID": "isStart",
68 | "Name": "是否启动定时器",
69 | "Description": "判断定时器是否启动,返回当前状态",
70 | "ReturnType": "Bool",
71 | "ReturnDesc": "为true时定时器为启动状态,false时定时器为未启动状态",
72 | "Paras": []
73 | },
74 | {
75 | "ID": "start",
76 | "Name": "启动",
77 | "Description": "启动定时器",
78 | "ReturnType": "",
79 | "ReturnDesc": "",
80 | "Paras": []
81 | },
82 | {
83 | "ID": "stop",
84 | "Name": "取消",
85 | "Description": "取消定时器",
86 | "ReturnType": "",
87 | "ReturnDesc": "",
88 | "Paras": []
89 | }
90 | ],
91 | "asyncMethodes": []
92 | }
--------------------------------------------------------------------------------
/source/view/message/message.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var device = sm("do_Device");
6 | var rootview = ui("$");
7 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
8 |
9 | var userInfo = global.getMemory("userInfo");
10 |
11 | var deviceOS = device.getInfo().OS;
12 | deviceOS = deviceOS == "android" || deviceOS.indexOf("iPhone") > -1;
13 |
14 | var huanxin = deviceOS ? sm("do_HuanXinIM") : false;
15 | var sqlite3 = mm("do_SQLite");
16 |
17 | sqlite3.open("data://oa.db");
18 | sqlite3.update = "UPDATE chat SET time=(datetime('NOW','localtime')),status=0 WHERE username='{{username}}' AND ref='{{ref}}';".replace("{{ref}}", userInfo.itcode);
19 | sqlite3.select = "SELECT * FROM chat WHERE ref='{{ref}}' ORDER BY time DESC;".replace("{{ref}}", userInfo.itcode);
20 |
21 | var listview = ui("do_listview");
22 | var listdata = mm("do_ListData");
23 | listview.bindItems(listdata);
24 |
25 | var binddata = function(){
26 | sqlite3.query(sqlite3.select, function(data){
27 | if (pbar.visible) pbar.visible = false;
28 | else listview.rebound();
29 | data.forEach(function(v){
30 | v["visible"] = !!(v["status"] * 1);
31 | });
32 | listdata.removeAll();
33 | listdata.addData(data);
34 | listview.refreshItems();
35 | });
36 | };
37 |
38 | pbar.visible = true;
39 | binddata();
40 | app.on("huanxin-r-listen", binddata);
41 |
42 | listview.on("touch", function(data){
43 | if (!huanxin) return nf.alert("此系统暂不支持即时消息");
44 | data = listdata.getOne(data);
45 | sqlite3.executeSync(sqlite3.update.replace("{{username}}", data["username"]));
46 | huanxin.enterChat({
47 | userID: data["username"],
48 | userNick: data["nickname"],
49 | userIcon: data["userlogo"],
50 | selfNick: userInfo.name,
51 | selfIcon: userInfo.icon,
52 | tag: data["username"]
53 | });
54 | binddata();
55 | });
56 |
57 | listview.on("pull", function(data){
58 | if (data.state !== 2) return;
59 | binddata();
60 | });
61 |
62 | var action_add = ui("action_add");
63 | action_add.on("touch", function(){
64 | page.fire("index-listen", {view: "contact"});
65 | });
66 |
--------------------------------------------------------------------------------
/source/view/work/employer.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "textAlign": "center"
43 | }
44 | ]
45 | },
46 | {
47 | "id": "do_listview",
48 | "y": "70",
49 | "width": "480",
50 | "height": "784",
51 | "bgColor": "FFFFFFFF",
52 | "type": "do_ListView",
53 | "headerView": "source://view/kit/hbar.ui",
54 | "isHeaderVisible": "true",
55 | "templates": "source://view/work/cell0.ui,source://view/work/cell1.ui,source://view/work/cell2.ui,source://view/work/cell3.ui,source://view/work/cell4.ui"
56 | }
57 | ]
58 | }
59 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_SwitchView.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_SwitchView",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "开关",
6 | "Version": "Internal",
7 | "Description": "SwitchView 是一个带有开关选择的UI组件,只有(开,关)两种状态,点击或拽动改变状态,该组件的样式是跟随系统,各平台显示效果不完全一样 ,可以应用于是否记住密码场景和一些具有布尔类型的配置页面",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_SwitchView/开关.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "checked",
32 | "Name": "是否选中",
33 | "Type": "Bool",
34 | "DefaultValue": "false",
35 | "EditType": "1",
36 | "Group": "",
37 | "Description": "设置当前状态,默认为不选中状态",
38 | "Design": {
39 | "Type": "Boolean",
40 | "Data": []
41 | }
42 | },
43 | {
44 | "ID": "colors",
45 | "Name": "组件状态颜色",
46 | "Type": "String",
47 | "DefaultValue": "00FF00,888888,FFFFFF",
48 | "EditType": "0",
49 | "Group": "",
50 | "Description": "SwitchView 各种状态的颜色:open的背景颜色值,close的背景颜色值,slider的背景颜色值, 默认值为:“00FF00,888888,FFFFFF”",
51 | "Design": {
52 | "Type": "Richtext",
53 | "Data": []
54 | }
55 | },
56 | {
57 | "ID": "shape",
58 | "Name": "组件形状",
59 | "Type": "String",
60 | "DefaultValue": "circle",
61 | "EditType": "0",
62 | "Group": "",
63 | "Description": "设置组件形状,有两种形状,rect矩形,circle圆形",
64 | "Design": {
65 | "Type": "List",
66 | "Data": [
67 | {
68 | "id": "rect",
69 | "value": "矩形"
70 | },
71 | {
72 | "id": "circle",
73 | "value": "圆形"
74 | }
75 | ]
76 | }
77 | }
78 | ],
79 | "Events": [
80 | {
81 | "ID": "changed",
82 | "Description": "开关状态触发",
83 | "ReturnType": "Bool",
84 | "ReturnDesc": "当前状态"
85 | }
86 | ],
87 | "syncMethodes": [],
88 | "asyncMethodes": []
89 | }
--------------------------------------------------------------------------------
/source/view/inform/slide_cell.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var rootview = ui("$");
5 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, -50));
6 | var $U = require("url");
7 | var open = require("open");
8 |
9 | rootview.setMapping({
10 | "tag": "id"
11 | });
12 |
13 | var isMore = false;
14 | var listview = ui("do_listview");
15 | var listdata = mm("do_ListData");
16 | listview.bindItems(listdata);
17 | var listcache = sm("do_DataCache");
18 | var cachekey = "cache_inform";
19 |
20 | var inform_http = mm("do_Http");
21 | var tokenUrl = $U.token($U.url.GetInformationList) + "&";
22 | inform_http.method = "get";
23 | inform_http.timeout = "60000";
24 | inform_http.contentType = "application/json";
25 | inform_http.on("fail", function(data){
26 | $U.fail(data, pbar, listview);
27 | }).on("success", function(data){
28 | if (pbar.visible) pbar.visible = false;
29 | else listview.rebound();
30 | if (!$U.headCodeCheck(data)) return;
31 | data = $U.inform_format(data.body);
32 | if (!isMore) listdata.removeAll();
33 | listdata.addData(data);
34 | listview.refreshItems();
35 | listcache.saveData({key: cachekey + body.typeId, value: listdata.getRange(0)});
36 | });
37 |
38 | var body = {typeId: "", page: 1};
39 | var binddata = function(body){
40 | if (isMore) body.page++;
41 | else body.page = 1;
42 | inform_http.url = tokenUrl + $U.queryString(body);
43 | inform_http.request();
44 | };
45 |
46 | rootview.on("dataRefreshed", function(){
47 | body.typeId = rootview.tag;
48 | var datacache = listcache.loadData({key: cachekey + body.typeId});
49 | if (datacache) {
50 | listdata.removeAll();
51 | listdata.addData(datacache);
52 | listview.refreshItems();
53 | } else {
54 | pbar.visible = true;
55 | }
56 | binddata(body);
57 | });
58 |
59 | listview.on("touch", function(data){
60 | data = listdata.getOne(data);
61 | if (data.template == 3) return;
62 | open.start("source://view/inform/detail.ui", data);
63 | }).on("pull", function(data){
64 | if (data.state != 2) return;
65 | isMore = false;
66 | binddata(body);
67 | }).on("push", function(data){
68 | if (data.state != 2) return;
69 | isMore = true;
70 | binddata(body);
71 | });
72 |
--------------------------------------------------------------------------------
/source/view/setting/attention/attention.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "type": "do_ALayout",
7 | "views": [
8 | {
9 | "id": "do_alayout_2",
10 | "width": "480",
11 | "height": "70",
12 | "bgColor": "E03E3FFF",
13 | "type": "do_ALayout",
14 | "views": [
15 | {
16 | "id": "action_back",
17 | "width": "80",
18 | "height": "70",
19 | "type": "do_ALayout",
20 | "views": [
21 | {
22 | "id": "do_imageview_1",
23 | "x": "30",
24 | "y": "18",
25 | "width": "18",
26 | "height": "34",
27 | "type": "do_ImageView",
28 | "source": "source://image/topbar@back.png"
29 | }
30 | ]
31 | },
32 | {
33 | "id": "label_title",
34 | "x": "100",
35 | "y": "10",
36 | "width": "280",
37 | "height": "50",
38 | "type": "do_Label",
39 | "fontColor": "FFFFFFFF",
40 | "fontSize": "30",
41 | "text": "我的关注",
42 | "textAlign": "center"
43 | }
44 | ]
45 | },
46 | {
47 | "id": "do_listview",
48 | "y": "70",
49 | "width": "480",
50 | "height": "784",
51 | "bgColor": "FFFFFFFF",
52 | "type": "do_ListView",
53 | "footerView": "source://view/kit/fbar.ui",
54 | "headerView": "source://view/kit/hbar.ui",
55 | "isFooterVisible": "true",
56 | "isHeaderVisible": "true",
57 | "templates": "source://view/contact/cell0.ui"
58 | }
59 | ]
60 | }
61 | }
--------------------------------------------------------------------------------
/source/view/message/message.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "label_title",
18 | "x": "100",
19 | "y": "10",
20 | "width": "280",
21 | "height": "50",
22 | "type": "do_Label",
23 | "fontColor": "FFFFFFFF",
24 | "fontSize": "30",
25 | "text": "即时消息",
26 | "textAlign": "center"
27 | },
28 | {
29 | "id": "action_add",
30 | "x": "400",
31 | "width": "80",
32 | "height": "70",
33 | "type": "do_ALayout",
34 | "views": [
35 | {
36 | "id": "do_imageview_1",
37 | "x": "20",
38 | "y": "15",
39 | "width": "40",
40 | "height": "40",
41 | "type": "do_ImageView",
42 | "scale": "fillxory",
43 | "source": "source://image/work@add.png"
44 | }
45 | ]
46 | }
47 | ]
48 | },
49 | {
50 | "id": "do_listview",
51 | "y": "70",
52 | "width": "480",
53 | "height": "700",
54 | "bgColor": "FFFFFFFF",
55 | "type": "do_ListView",
56 | "headerView": "source://view/kit/hbar.ui",
57 | "isHeaderVisible": "true",
58 | "templates": "source://view/message/cell0.ui"
59 | }
60 | ]
61 | }
62 | }
--------------------------------------------------------------------------------
/source/view/apps/scan/scan.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "000000FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "扫一扫",
43 | "textAlign": "center"
44 | }
45 | ]
46 | },
47 | {
48 | "id": "barc_scan",
49 | "x": "80",
50 | "y": "240",
51 | "width": "320",
52 | "height": "320",
53 | "type": "do_BarcodeView"
54 | },
55 | {
56 | "id": "action_start",
57 | "x": "100",
58 | "y": "580",
59 | "width": "280",
60 | "height": "60",
61 | "type": "do_Button",
62 | "fontColor": "FFFFFFFF",
63 | "fontSize": "24",
64 | "text": "扫描二维码"
65 | }
66 | ]
67 | }
68 | }
--------------------------------------------------------------------------------
/source/view/reg.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 | var $U = require("url");
8 |
9 | page.on("back", function(data){
10 | app.closePage(data);
11 | });
12 |
13 | ui("action_back").on("touch", function(){
14 | page.hideKeyboard();
15 | app.closePage();
16 | });
17 |
18 | var tf_itcode = ui("tf_itcode");
19 | var tf_pwd = ui("tf_pwd");
20 | var tf_name = ui("tf_name");
21 | var tf_employer = ui("tf_employer");
22 | var tf_position = ui("tf_position");
23 | var tf_departement = ui("tf_departement");
24 | var tf_email = ui("tf_email");
25 | var tf_fix = ui("tf_fix");
26 | var tf_phone = ui("tf_phone");
27 | var action_ok = ui("action_ok");
28 |
29 | var reg_http = mm("do_Http");
30 | reg_http.url = $U.url.RegisterEmployer;
31 | reg_http.method = "post";
32 | reg_http.timeout = "60000";
33 | reg_http.contentType = "application/json";
34 | reg_http.on("fail", function(data){
35 | $U.fail(data, pbar);
36 | }).on("success", function(data){
37 | pbar.visible = false;
38 | if (!$U.headCodeCheck(data)) return;
39 | nf.alert("注册成功", function(){
40 | page.fire("back", {login_reg: true, itcode: tf_itcode.text, pwd: tf_pwd.text});
41 | });
42 | });
43 |
44 | var anim_button = mm("do_Animation", "BUTTONTOUCHDOWN", "app");
45 | var tips = {
46 | Itcode: "ID不可为空",
47 | pwd: "密码不可为空",
48 | Name: "姓名不可为空",
49 | Email: "邮箱不可为空",
50 | PhoneNumber: "手机号码不可为空"
51 | };
52 | action_ok.on("touch", function(){
53 | page.hideKeyboard();
54 | var body = {
55 | Itcode: tf_itcode.text.toLowerCase().trim(),
56 | pwd: tf_pwd.text.trim(),
57 | Name: tf_name.text.trim(),
58 | EmployerNumber: tf_employer.text.trim(),
59 | DcPosition: tf_position.text.trim(),
60 | DepartementName: tf_departement.text.trim(),
61 | Email: tf_email.text.trim(),
62 | FixPhoneNumber: tf_fix.text.trim(),
63 | PhoneNumber: tf_phone.text.trim()
64 | };
65 | for (var i in body) {
66 | if (!body[i]) if (tips[i]) return nf.toast(tips[i]);
67 | }
68 | pbar.visible = true;
69 | reg_http.body = body;
70 | reg_http.request();
71 | }).on("touchDown", function(){
72 | this.animate(anim_button);
73 | });
74 |
75 | rootview.on("touch", function(){
76 | page.hideKeyboard();
77 | });
78 |
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_SegmentView.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_SegmentView",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "滑动视图",
6 | "Version": "Internal",
7 | "Description": "分段选择视图,支持手势滑动和点击选中一个index,通常和do_SlideView结合在一起使用,互相联动;当height=-1时,表示自动宽度,windows不支持",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/D/20160121/do_SegmentView/滑动视图.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "index",
32 | "Name": "当前滑动cell索引",
33 | "Type": "Number",
34 | "DefaultValue": "0",
35 | "EditType": "1",
36 | "Group": "",
37 | "Description": "设置当前滑动cell索引值,默认为0",
38 | "Design": {
39 | "Type": "UInteger",
40 | "Data": []
41 | }
42 | },
43 | {
44 | "ID": "templates",
45 | "Name": "cell对应的模板UI文件组",
46 | "Type": "String",
47 | "DefaultValue": "",
48 | "EditType": "0",
49 | "Group": "",
50 | "Description": "一个SegmentView可以有多个cell模板,这个属性是一个json array,每一个元素都是一个source ui文件。这个属性的格式类似如下: source://view/cell1.ui,source://view/cell2.ui,source://view/cell3.ui",
51 | "Design": {
52 | "Type": "Richtext",
53 | "Data": []
54 | }
55 | }
56 | ],
57 | "Events": [
58 | {
59 | "ID": "indexChanged",
60 | "Description": "点击cell加载完成后触发",
61 | "ReturnType": "String",
62 | "ReturnDesc": "返回当前cell的index"
63 | }
64 | ],
65 | "syncMethodes": [
66 | {
67 | "ID": "bindItems",
68 | "Name": "绑定item的数据",
69 | "Description": "可绑定listData实例",
70 | "ReturnType": "",
71 | "ReturnDesc": "",
72 | "Paras": [
73 | {
74 | "ID": "data",
75 | "Name": "数据",
76 | "Type": "Node",
77 | "Required": 0,
78 | "DefaultValue": "",
79 | "Description": ""
80 | }
81 | ]
82 | },
83 | {
84 | "ID": "refreshItems",
85 | "Name": "刷新item数据",
86 | "Description": "",
87 | "ReturnType": "",
88 | "ReturnDesc": "",
89 | "Paras": []
90 | }
91 | ],
92 | "asyncMethodes": []
93 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_FrameAnimationView.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_FrameAnimationView",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "帧动画视图",
6 | "Version": "Internal",
7 | "Description": "加载gif动图的视图,也可以将多张图片组合设置为动图效果;gifSource:和imagesSource属性不会同时起作用,两个属性同时设置时以imagesSource为准",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_FrameAnimationView/帧动画.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [],
31 | "syncMethodes": [
32 | {
33 | "ID": "startGif",
34 | "Name": "开始动画",
35 | "Description": "",
36 | "ReturnType": "",
37 | "ReturnDesc": "",
38 | "Paras": [
39 | {
40 | "ID": "data",
41 | "Name": "gif资源",
42 | "Type": "String",
43 | "Required": 1,
44 | "DefaultValue": "",
45 | "Description": "支持data://, source://路径"
46 | },
47 | {
48 | "ID": "repeat",
49 | "Name": "重复次数",
50 | "Type": "Number",
51 | "Required": 0,
52 | "DefaultValue": "1",
53 | "Description": "帧动画的重复次数,为-1或小于0时表示无限循环,为0时表示没有动画,默认执行一次"
54 | }
55 | ]
56 | },
57 | {
58 | "ID": "startImages",
59 | "Name": "开始动画",
60 | "Description": "",
61 | "ReturnType": "",
62 | "ReturnDesc": "",
63 | "Paras": [
64 | {
65 | "ID": "data",
66 | "Name": "图片列表",
67 | "Type": "Node",
68 | "Required": 1,
69 | "DefaultValue": "",
70 | "Description": "[ {path:'data://2.png',duration:50}, {path:'data://3.png',duration:50} ] ,支持data://, source://路径,其中duration的单位为毫秒"
71 | },
72 | {
73 | "ID": "repeat",
74 | "Name": "重复次数",
75 | "Type": "Number",
76 | "Required": 0,
77 | "DefaultValue": "1",
78 | "Description": "帧动画的重复次数,为-1或小于0时表示无限循环,为0时表示没有动画,默认执行一次"
79 | }
80 | ]
81 | },
82 | {
83 | "ID": "stop",
84 | "Name": "结束动画",
85 | "Description": "",
86 | "ReturnType": "",
87 | "ReturnDesc": "",
88 | "Paras": []
89 | }
90 | ],
91 | "asyncMethodes": []
92 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_VideoView.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_VideoView",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "视频播放器",
6 | "Version": "Internal",
7 | "Description": "一个简单的播放视频的UI组件,能支持播放本地和网络视频,可支持mp4格式,可以通过点击全屏按钮切换到全屏播放",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_VideoView/video.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "path",
32 | "Name": "播放文件源路径",
33 | "Type": "String",
34 | "DefaultValue": "",
35 | "EditType": "1",
36 | "Group": "",
37 | "Description": "支持data://、source://和网络地址",
38 | "Design": {
39 | "Type": "FileSource",
40 | "Data": []
41 | }
42 | }
43 | ],
44 | "Events": [
45 | {
46 | "ID": "error",
47 | "Description": "视频播放异常时触发",
48 | "ReturnType": "String",
49 | "ReturnDesc": ""
50 | },
51 | {
52 | "ID": "finished",
53 | "Description": "视频播放完后触发",
54 | "ReturnType": "String",
55 | "ReturnDesc": ""
56 | }
57 | ],
58 | "syncMethodes": [
59 | {
60 | "ID": "pause",
61 | "Name": "暂停播放",
62 | "Description": "",
63 | "ReturnType": "Number",
64 | "ReturnDesc": "返回当前视频暂停时的位置,毫秒值",
65 | "Paras": []
66 | },
67 | {
68 | "ID": "play",
69 | "Name": "开始播放",
70 | "Description": "",
71 | "ReturnType": "",
72 | "ReturnDesc": "",
73 | "Paras": [
74 | {
75 | "ID": "point",
76 | "Name": "播放起点",
77 | "Type": "Number",
78 | "Required": 0,
79 | "DefaultValue": "",
80 | "Description": "从视频中的某一点开始播放,毫秒值"
81 | }
82 | ]
83 | },
84 | {
85 | "ID": "resume",
86 | "Name": "继续播放",
87 | "Description": "",
88 | "ReturnType": "",
89 | "ReturnDesc": "",
90 | "Paras": []
91 | },
92 | {
93 | "ID": "stop",
94 | "Name": "停止播放",
95 | "Description": "",
96 | "ReturnType": "",
97 | "ReturnDesc": "",
98 | "Paras": []
99 | }
100 | ],
101 | "asyncMethodes": []
102 | }
--------------------------------------------------------------------------------
/source/view/inform/inform.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "FFFFFFFF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "label_title",
18 | "x": "100",
19 | "y": "10",
20 | "width": "280",
21 | "height": "50",
22 | "type": "do_Label",
23 | "fontColor": "FFFFFFFF",
24 | "fontSize": "30",
25 | "text": "信息",
26 | "textAlign": "center"
27 | }
28 | ]
29 | },
30 | {
31 | "id": "do_segmentview",
32 | "y": "70",
33 | "width": "420",
34 | "height": "50",
35 | "type": "do_SegmentView",
36 | "templates": "source://view/inform/seg_cell.ui"
37 | },
38 | {
39 | "id": "do_slideview",
40 | "y": "120",
41 | "width": "480",
42 | "height": "650",
43 | "type": "do_SlideView",
44 | "templates": "source://view/inform/slide_cell.ui"
45 | },
46 | {
47 | "id": "do_line_1",
48 | "y": "120",
49 | "width": "480",
50 | "height": "1",
51 | "bgColor": "DBDBDBFF",
52 | "type": "do_Label"
53 | },
54 | {
55 | "id": "action_select",
56 | "x": "420",
57 | "y": "70",
58 | "width": "60",
59 | "height": "50",
60 | "type": "do_ALayout",
61 | "views": [
62 | {
63 | "id": "do_imageview_1",
64 | "x": "15",
65 | "y": "17",
66 | "width": "30",
67 | "height": "16",
68 | "type": "do_ImageView",
69 | "scale": "fillxory",
70 | "source": "source://image/arrow@down.png"
71 | }
72 | ]
73 | }
74 | ]
75 | }
76 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_DateTimePicker.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_DateTimePicker",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "日期,时间选择控件",
6 | "Version": "Internal",
7 | "Description": "弹出时间,日期选择窗口来选择时间,时间格式都是long型时间戳格式,windows平台不支持long型",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_DateTimePicker/日期.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [],
31 | "syncMethodes": [],
32 | "asyncMethodes": [
33 | {
34 | "ID": "show",
35 | "Name": "弹出选择日期,时间,或日期时间窗口",
36 | "Description": "",
37 | "ReturnType": "Node",
38 | "ReturnDesc": "{\"flag\":0,\"time\":\"2312412343\"},flag =0 表示点击了第一个按钮,flag = 1 表示点击了第二个按钮...,time表示long型时间",
39 | "Paras": [
40 | {
41 | "ID": "type",
42 | "Name": "打开窗口的类型",
43 | "Type": "Number",
44 | "Required": 1,
45 | "DefaultValue": "",
46 | "Description": "0表示日期及时间,1表示只有日期,2表示只有时间,3表示日期、星期及时间"
47 | },
48 | {
49 | "ID": "data",
50 | "Name": "预设置的日期",
51 | "Type": "String",
52 | "Required": 0,
53 | "DefaultValue": "",
54 | "Description": "long型时间,缺失值是当前日期时间long型"
55 | },
56 | {
57 | "ID": "maxDate",
58 | "Name": "最大日期",
59 | "Type": "String",
60 | "Required": 0,
61 | "DefaultValue": "4102329600000",
62 | "Description": "long型时间,缺省值是2099年对应的long型"
63 | },
64 | {
65 | "ID": "minDate",
66 | "Name": "最小日期",
67 | "Type": "String",
68 | "Required": 0,
69 | "DefaultValue": "0",
70 | "Description": "long型时间,最小日期不能大于最大日期,缺省值是1970年对应的long型"
71 | },
72 | {
73 | "ID": "title",
74 | "Name": "窗口的标题",
75 | "Type": "String",
76 | "Required": 0,
77 | "DefaultValue": "日期时间选择",
78 | "Description": "缺省值是‘时间选择’或者‘日期选择’或者‘日期时间选择’,根据type来区分"
79 | },
80 | {
81 | "ID": "buttons",
82 | "Name": "button集合",
83 | "Type": "Node",
84 | "Required": 0,
85 | "DefaultValue": "[\"取消\",\"确定\"]",
86 | "Description": "为空或不设值不显示按钮,显示缺省值,如果设值为[],则不显示按钮"
87 | }
88 | ]
89 | }
90 | ]
91 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_iFlyVoice.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_iFlyVoice",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "讯飞语音",
6 | "Version": "Internal",
7 | "Description": "集成讯飞提供的语音识别类",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/R/20150624/f492056e-ef9e-4938-95e6-c4e5837f901f.png",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 0,
19 | "MinVersion": ""
20 | },
21 | "WindowsPhone": {
22 | "Support": 0,
23 | "MinVersion": ""
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [
31 | {
32 | "ID": "begin",
33 | "Description": "开始播放时触发",
34 | "ReturnType": "String",
35 | "ReturnDesc": ""
36 | },
37 | {
38 | "ID": "finished",
39 | "Description": "播放完成或播放错误时触发",
40 | "ReturnType": "String",
41 | "ReturnDesc": ""
42 | }
43 | ],
44 | "syncMethodes": [
45 | {
46 | "ID": "pause",
47 | "Name": "暂停播放",
48 | "Description": "",
49 | "ReturnType": "",
50 | "ReturnDesc": "",
51 | "Paras": []
52 | },
53 | {
54 | "ID": "resume",
55 | "Name": "继续播放",
56 | "Description": "",
57 | "ReturnType": "",
58 | "ReturnDesc": "",
59 | "Paras": []
60 | },
61 | {
62 | "ID": "speak",
63 | "Name": "开始播放",
64 | "Description": "",
65 | "ReturnType": "",
66 | "ReturnDesc": "",
67 | "Paras": [
68 | {
69 | "ID": "text",
70 | "Name": "文本内容",
71 | "Type": "String",
72 | "Required": 1,
73 | "DefaultValue": "",
74 | "Description": "要读出的文本内容"
75 | },
76 | {
77 | "ID": "role",
78 | "Name": "角色",
79 | "Type": "String",
80 | "Required": 0,
81 | "DefaultValue": "xiaoyan",
82 | "Description": "需要朗读的角色,值列表见http://bbs.deviceone.net/forum.php?mod=viewthread&tid=32&extra="
83 | }
84 | ]
85 | },
86 | {
87 | "ID": "stop",
88 | "Name": "停止播放",
89 | "Description": "",
90 | "ReturnType": "",
91 | "ReturnDesc": "",
92 | "Paras": []
93 | }
94 | ],
95 | "asyncMethodes": [
96 | {
97 | "ID": "open",
98 | "Name": "打开语音识别功能",
99 | "Description": "",
100 | "ReturnType": "Node",
101 | "ReturnDesc": "{\\\"result\\\":\\\"你好\\\",\\\"spell\\\":\\\"nihao\\\",\\\"errorMsg\\\":\\\"\\\"}",
102 | "Paras": []
103 | }
104 | ]
105 | }
--------------------------------------------------------------------------------
/source/view/apps/detail.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "action_exit",
35 | "x": "80",
36 | "width": "60",
37 | "height": "70",
38 | "visible": "false",
39 | "type": "do_ALayout",
40 | "views": [
41 | {
42 | "id": "do_label_1",
43 | "y": "10",
44 | "width": "60",
45 | "height": "50",
46 | "type": "do_Label",
47 | "fontColor": "FFFFFFFF",
48 | "fontSize": "24",
49 | "text": "关闭"
50 | }
51 | ]
52 | },
53 | {
54 | "id": "label_title",
55 | "x": "150",
56 | "y": "10",
57 | "width": "180",
58 | "height": "50",
59 | "type": "do_Label",
60 | "fontColor": "FFFFFFFF",
61 | "fontSize": "30",
62 | "textAlign": "center"
63 | }
64 | ]
65 | },
66 | {
67 | "id": "wv_detail",
68 | "y": "70",
69 | "width": "480",
70 | "height": "784",
71 | "type": "do_WebView"
72 | }
73 | ]
74 | }
75 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_DataCache.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_DataCache",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "数据缓存",
6 | "Version": "Internal",
7 | "Description": "缓存一些数据到本地文件,即使程序退出再进入还能获取到值,要确保设置的value值不要过大",
8 | "Icon": "https://do-store.oss-cn-beijing.aliyuncs.com/D/20160121/do_DataCache/缓存管理.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "10"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "10"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [],
31 | "syncMethodes": [
32 | {
33 | "ID": "hasData",
34 | "Name": "是否有数据",
35 | "Description": "判断是否有数据",
36 | "ReturnType": "Bool",
37 | "ReturnDesc": "true有数据,false没有",
38 | "Paras": [
39 | {
40 | "ID": "key",
41 | "Name": "",
42 | "Type": "String",
43 | "Required": 1,
44 | "DefaultValue": "",
45 | "Description": ""
46 | }
47 | ]
48 | },
49 | {
50 | "ID": "loadData",
51 | "Name": "读数据",
52 | "Description": "把数据从缓存取出",
53 | "ReturnType": "String",
54 | "ReturnDesc": "返回读取的数据值",
55 | "Paras": [
56 | {
57 | "ID": "key",
58 | "Name": "",
59 | "Type": "String",
60 | "Required": 1,
61 | "DefaultValue": "",
62 | "Description": ""
63 | }
64 | ]
65 | },
66 | {
67 | "ID": "removeAll",
68 | "Name": "删除全部数据",
69 | "Description": "",
70 | "ReturnType": "Bool",
71 | "ReturnDesc": "true为成功,false为失败",
72 | "Paras": []
73 | },
74 | {
75 | "ID": "removeData",
76 | "Name": "删除数据",
77 | "Description": "清楚某个key的数据",
78 | "ReturnType": "Bool",
79 | "ReturnDesc": "true/false表明删除是否成功",
80 | "Paras": [
81 | {
82 | "ID": "key",
83 | "Name": "",
84 | "Type": "String",
85 | "Required": 1,
86 | "DefaultValue": "",
87 | "Description": ""
88 | }
89 | ]
90 | },
91 | {
92 | "ID": "saveData",
93 | "Name": "写数据",
94 | "Description": "把数据写入缓存",
95 | "ReturnType": "Bool",
96 | "ReturnDesc": "true/false表明写数据是否成功",
97 | "Paras": [
98 | {
99 | "ID": "key",
100 | "Name": "",
101 | "Type": "String",
102 | "Required": 1,
103 | "DefaultValue": "",
104 | "Description": ""
105 | },
106 | {
107 | "ID": "value",
108 | "Name": "",
109 | "Type": "String",
110 | "Required": 1,
111 | "DefaultValue": "",
112 | "Description": ""
113 | }
114 | ]
115 | }
116 | ],
117 | "asyncMethodes": []
118 | }
--------------------------------------------------------------------------------
/source/view/inform/comment_cell.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_linearlayout_1",
4 | "width": "480",
5 | "height": "-1",
6 | "type": "do_LinearLayout",
7 | "direction": "horizontal",
8 | "views": [
9 | {
10 | "id": "do_alayout_1",
11 | "width": "70",
12 | "height": "70",
13 | "type": "do_ALayout",
14 | "views": [
15 | {
16 | "id": "icon",
17 | "x": "15",
18 | "y": "15",
19 | "width": "40",
20 | "height": "40",
21 | "type": "do_ImageView",
22 | "defaultImage": "source://image/user@avatar.png",
23 | "scale": "fillxory"
24 | }
25 | ]
26 | },
27 | {
28 | "id": "do_linearlayout_2",
29 | "width": "410",
30 | "height": "-1",
31 | "type": "do_LinearLayout",
32 | "views": [
33 | {
34 | "id": "do_label_1",
35 | "width": "410",
36 | "height": "10",
37 | "type": "do_Label"
38 | },
39 | {
40 | "id": "do_alayout_2",
41 | "width": "410",
42 | "height": "40",
43 | "type": "do_ALayout",
44 | "views": [
45 | {
46 | "id": "name",
47 | "width": "180",
48 | "height": "40",
49 | "type": "do_Label",
50 | "fontSize": "24"
51 | },
52 | {
53 | "id": "createTime",
54 | "x": "180",
55 | "y": "5",
56 | "width": "220",
57 | "height": "30",
58 | "type": "do_Label",
59 | "fontColor": "999999FF",
60 | "fontSize": "20",
61 | "textAlign": "right"
62 | }
63 | ]
64 | },
65 | {
66 | "id": "message",
67 | "width": "400",
68 | "height": "-1",
69 | "type": "do_Label",
70 | "fontSize": "24"
71 | },
72 | {
73 | "id": "do_label_2",
74 | "width": "410",
75 | "height": "15",
76 | "type": "do_Label"
77 | }
78 | ]
79 | }
80 | ]
81 | }
82 | }
--------------------------------------------------------------------------------
/source/view/work/work.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var storage = sm("do_Storage");
5 | var imgbrowser = sm("do_ImageBrowser");
6 | var rootview = ui("$");
7 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
8 | var $U = require("url");
9 | var open = require("open");
10 |
11 | ui("action_add").on("touch", function(){
12 | open.start("source://view/work/add.ui");
13 | });
14 |
15 | var contact = {
16 | source: "data://AllEmployers.zip",
17 | target: "data://",
18 | file: "data://AllEmployers.txt",
19 | detail: function(id){
20 | storage.readFile(contact.file, function(data){
21 | if (typeof data == "string") eval("data = " + data);
22 | data.forEach(function(v){
23 | if (id == v[3]) {
24 | pbar.visible = false;
25 | return open.start("source://view/contact/detail.ui", {
26 | pinyinIndex: v[0],
27 | itcodeIndex: v[1],
28 | pinyin: v[2],
29 | itcode: v[3],
30 | name: v[4],
31 | mobile: v[5],
32 | id: v[6],
33 | email: v[7],
34 | telephone: v[8],
35 | dcPosition: v[9],
36 | departname: v[10],
37 | icon: $U.prefix + v[11],
38 | nameP: v[4] + " " + v[2],
39 | itcodeP: v[6] + " " + v[3] + " " + v[9]
40 | });
41 | }
42 | })
43 | })
44 | }
45 | };
46 |
47 | if (!storage.fileExist(contact.file)) {
48 | storage.unzip(contact.source, contact.target, function(){
49 | this.deleteFile(contact.source);
50 | });
51 | }
52 |
53 | page.on("icon-listen", function(data){
54 | // open.start("source://view/work/employer.ui", data);
55 | pbar.visible = true;
56 | contact.detail(data.id);
57 | });
58 |
59 | page.on("imgs-listen", function(data){
60 | imgbrowser.show(data.s, data.i);
61 | });
62 |
63 | page.on("praise-listen", function(data){
64 | nf.alert("赞");
65 | });
66 |
67 | page.on("comment-listen", function(data){
68 | open.start("source://view/work/comment.ui", data);
69 | });
70 |
71 | var work_shower = ui("work_shower");
72 | var work_btns = [ui("action_all"), ui("action_att")];
73 | var v, path = [], prev = work_btns[0];
74 | for (var i = 0, len = work_btns.length; i < len; i++) {
75 | v = work_btns[i];
76 | path.push({
77 | id: v.tag,
78 | path: "source://view/work/work_" + v.tag + ".ui"
79 | });
80 | v.on("touch", function(){
81 | if (this.bgColor == "FFFFFFFF") return;
82 | prev.bgColor = "00000000";
83 | prev.fontColor = "FFFFFFFF";
84 | this.bgColor = "FFFFFFFF";
85 | this.fontColor = "E03E3FFF";
86 | prev = this;
87 | work_shower.showView(this.tag);
88 | });
89 | }
90 |
91 | work_shower.addViews(path);
92 | work_shower.showView("all");
93 |
--------------------------------------------------------------------------------
/source/view/apps/apps.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "label_title",
18 | "x": "100",
19 | "y": "10",
20 | "width": "280",
21 | "height": "50",
22 | "type": "do_Label",
23 | "fontColor": "FFFFFFFF",
24 | "fontSize": "30",
25 | "text": "应用+",
26 | "textAlign": "center"
27 | },
28 | {
29 | "id": "action_refresh",
30 | "x": "400",
31 | "width": "80",
32 | "height": "70",
33 | "type": "do_ALayout",
34 | "views": [
35 | {
36 | "id": "do_imageview_2",
37 | "x": "20",
38 | "y": "15",
39 | "width": "40",
40 | "height": "40",
41 | "type": "do_ImageView",
42 | "scale": "fillxory",
43 | "source": "source://image/apps@refresh.png"
44 | }
45 | ]
46 | },
47 | {
48 | "id": "action_ok",
49 | "x": "400",
50 | "width": "80",
51 | "height": "70",
52 | "visible": "false",
53 | "bgColor": "E03E3FFF",
54 | "type": "do_ALayout",
55 | "views": [
56 | {
57 | "id": "do_imageview_1",
58 | "x": "20",
59 | "y": "21",
60 | "width": "41",
61 | "height": "28",
62 | "type": "do_ImageView",
63 | "scale": "fillxory",
64 | "source": "source://image/feedback@send.png"
65 | }
66 | ]
67 | }
68 | ]
69 | },
70 | {
71 | "id": "do_gridview",
72 | "y": "70",
73 | "width": "480",
74 | "height": "700",
75 | "bgColor": "FFFFFFFF",
76 | "type": "do_GridView",
77 | "numColumns": "3",
78 | "templates": "source://view/apps/cell0.ui,source://view/apps/cell1.ui,source://view/apps/cell2.ui"
79 | }
80 | ]
81 | }
82 | }
--------------------------------------------------------------------------------
/source/view/apps/memo/url.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "扫描结果",
43 | "textAlign": "center"
44 | },
45 | {
46 | "id": "action_open",
47 | "x": "400",
48 | "width": "80",
49 | "height": "70",
50 | "type": "do_ALayout",
51 | "views": [
52 | {
53 | "id": "do_imageview_2",
54 | "x": "20",
55 | "y": "15",
56 | "width": "40",
57 | "height": "40",
58 | "type": "do_ImageView",
59 | "scale": "fillxory",
60 | "source": "source://image/scan@open.png"
61 | }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | "id": "do_linearlayout_1",
68 | "y": "70",
69 | "width": "480",
70 | "height": "784",
71 | "type": "do_LinearLayout",
72 | "views": [
73 | {
74 | "id": "scan_url",
75 | "width": "460",
76 | "height": "-1",
77 | "margin": "10,0,0,10",
78 | "type": "do_Label",
79 | "fontSize": "24"
80 | }
81 | ]
82 | }
83 | ]
84 | }
85 | }
--------------------------------------------------------------------------------
/source/view/apps/scan/url.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "扫描结果",
43 | "textAlign": "center"
44 | },
45 | {
46 | "id": "action_open",
47 | "x": "400",
48 | "width": "80",
49 | "height": "70",
50 | "type": "do_ALayout",
51 | "views": [
52 | {
53 | "id": "do_imageview_2",
54 | "x": "20",
55 | "y": "15",
56 | "width": "40",
57 | "height": "40",
58 | "type": "do_ImageView",
59 | "scale": "fillxory",
60 | "source": "source://image/scan@open.png"
61 | }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | "id": "do_linearlayout_1",
68 | "y": "70",
69 | "width": "480",
70 | "height": "784",
71 | "type": "do_LinearLayout",
72 | "views": [
73 | {
74 | "id": "scan_url",
75 | "width": "460",
76 | "height": "-1",
77 | "margin": "10,0,0,10",
78 | "type": "do_Label",
79 | "fontSize": "24"
80 | }
81 | ]
82 | }
83 | ]
84 | }
85 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules.json:
--------------------------------------------------------------------------------
1 | [{"id":"do_Album","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.7"},{"id":"do_Alipay","platform":"Android, iOS","version":"1.6"},{"id":"do_Audio","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.6"},{"id":"do_BarcodeView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.3"},{"id":"do_Button","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.6"},{"id":"do_Camera","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.5"},{"id":"do_CheckBox","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.5"},{"id":"do_ComboBox","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.5"},{"id":"do_DataCache","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.1"},{"id":"do_DateTimePicker","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.2"},{"id":"do_Device","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"3.0"},{"id":"do_External","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.5"},{"id":"do_FrameAnimationView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.8"},{"id":"do_GridView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"3.0"},{"id":"do_HashData","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.9"},{"id":"do_Http","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"4.2"},{"id":"do_HuanXinIM","platform":"Android, iOS","version":"3.3"},{"id":"do_iFlyVoice","platform":"Android, iOS","version":"1.3"},{"id":"do_ImageBrowser","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.9"},{"id":"do_ImageView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"3.8"},{"id":"do_IndexListView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.2"},{"id":"do_InitData","platform":"Android, iOS","version":"1.0"},{"id":"do_Label","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.6"},{"id":"do_ListData","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.1"},{"id":"do_ListView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"4.9"},{"id":"do_Network","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.4"},{"id":"do_Notification","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.8"},{"id":"do_ProgressBar","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.9"},{"id":"do_ScrollView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"3.8"},{"id":"do_SegmentView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.8"},{"id":"do_SinaWeiBo","platform":"Android, iOS","version":"2.1"},{"id":"do_SlideView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"4.5"},{"id":"do_SQLite","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.6"},{"id":"do_SwitchView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.2"},{"id":"do_TencentQQ","platform":"Android, iOS","version":"2.4"},{"id":"do_TencentWX","platform":"Android, iOS","version":"2.4"},{"id":"do_TextBox","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"4.5"},{"id":"do_TextField","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"4.6"},{"id":"do_Timer","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"2.2"},{"id":"do_VideoView","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.2"},{"id":"do_ViewShower","platform":"Android, iOS, WindowsPhone, WindowsPC","version":"1.8"}]
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_ViewShower.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_ViewShower",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "过场动画效果",
6 | "Version": "Internal",
7 | "Description": "多个View切换控件,并保存各个View的状态",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/R/20150617/0e5d1e63-388e-41f1-9995-253f2c10545a.png",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [
31 | {
32 | "ID": "viewChanged",
33 | "Description": "View切换完成时触发",
34 | "ReturnType": "String",
35 | "ReturnDesc": "返回View切换后的id"
36 | }
37 | ],
38 | "syncMethodes": [
39 | {
40 | "ID": "addViews",
41 | "Name": "增加多个View",
42 | "Description": "",
43 | "ReturnType": "",
44 | "ReturnDesc": "",
45 | "Paras": [
46 | {
47 | "ID": "data",
48 | "Name": "增加的View数组",
49 | "Type": "Node",
50 | "Required": 1,
51 | "DefaultValue": "",
52 | "Description": "要增加的View的索引, 默认值为增加到最后.结构[{ id : '', path : ''} , {id :'' , path : ''} , ..... ]"
53 | }
54 | ]
55 | },
56 | {
57 | "ID": "removeView",
58 | "Name": "删除某个View",
59 | "Description": "",
60 | "ReturnType": "",
61 | "ReturnDesc": "",
62 | "Paras": [
63 | {
64 | "ID": "id",
65 | "Name": "删除的View索引",
66 | "Type": "String",
67 | "Required": 1,
68 | "DefaultValue": "",
69 | "Description": "要删除的View的id"
70 | }
71 | ]
72 | },
73 | {
74 | "ID": "showView",
75 | "Name": "切换View",
76 | "Description": "",
77 | "ReturnType": "",
78 | "ReturnDesc": "",
79 | "Paras": [
80 | {
81 | "ID": "id",
82 | "Name": "",
83 | "Type": "String",
84 | "Required": 1,
85 | "DefaultValue": "",
86 | "Description": "切换的目标View的 ID"
87 | },
88 | {
89 | "ID": "animationType",
90 | "Name": "过场动画类型",
91 | "Type": "String",
92 | "Required": 0,
93 | "DefaultValue": "",
94 | "Description": "winphone8不支持该动画效果,android和ios支持。\\r\\n目前支持以下几种:\\r\\n\\\"slide_l2r\\\": 从左至右滑出\\r\\n\\\"slide_r2l\\\": 从右至左滑出\\r\\n\\\"slide_b2t\\\": 从底至上滑出\\r\\n\\\"slide_t2b\\\": 从上至底滑出\\r\\n\\\"push_l2r\\\": 从左至右推出\\r\\n\\\"push_r2l\\\": 从右至左推出\\r\\n\\\"push_b2t\\\": 从底至上推出\\r\\n\\\"push_t2b\\\": 从上至底推出\\r\\n\\\"fade\\\" : 淡入淡出\\r\\n\\\"page_curl\\\" : 上翻页\\r\\n\\\"page_uncurl\\\" : 下翻页\\r\\n\\\"cube\\\" :立体翻转"
95 | },
96 | {
97 | "ID": "animationTime",
98 | "Name": "",
99 | "Type": "Number",
100 | "Required": 0,
101 | "DefaultValue": "300",
102 | "Description": "动画效果持续时间"
103 | }
104 | ]
105 | }
106 | ],
107 | "asyncMethodes": []
108 | }
--------------------------------------------------------------------------------
/source/view/work/work.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "do_button_1",
18 | "x": "120",
19 | "y": "10",
20 | "width": "240",
21 | "height": "50",
22 | "bgColor": "FFFFFFFF",
23 | "type": "do_Button"
24 | },
25 | {
26 | "id": "do_button_2",
27 | "x": "121",
28 | "y": "11",
29 | "width": "238",
30 | "height": "48",
31 | "bgColor": "E03E3FFF",
32 | "type": "do_Button"
33 | },
34 | {
35 | "id": "action_all",
36 | "x": "120",
37 | "y": "10",
38 | "width": "120",
39 | "height": "50",
40 | "bgColor": "FFFFFFFF",
41 | "tag": "all",
42 | "type": "do_Button",
43 | "fontColor": "E03E3FFF",
44 | "fontSize": "24",
45 | "text": "全部内容"
46 | },
47 | {
48 | "id": "action_att",
49 | "x": "240",
50 | "y": "10",
51 | "width": "120",
52 | "height": "50",
53 | "tag": "att",
54 | "type": "do_Button",
55 | "fontColor": "FFFFFFFF",
56 | "fontSize": "24",
57 | "text": "我的关注"
58 | },
59 | {
60 | "id": "action_add",
61 | "x": "400",
62 | "width": "80",
63 | "height": "70",
64 | "type": "do_ALayout",
65 | "views": [
66 | {
67 | "id": "do_imageview_2",
68 | "x": "20",
69 | "y": "15",
70 | "width": "40",
71 | "height": "40",
72 | "type": "do_ImageView",
73 | "scale": "fillxory",
74 | "source": "source://image/work@add.png"
75 | }
76 | ]
77 | }
78 | ]
79 | },
80 | {
81 | "id": "work_shower",
82 | "y": "70",
83 | "width": "480",
84 | "height": "700",
85 | "type": "do_ViewShower"
86 | }
87 | ]
88 | }
89 | }
--------------------------------------------------------------------------------
/source/view/inform/comment.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var rootview = ui("$");
6 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
7 | var $U = require("url");
8 |
9 | page.on("back", function(){
10 | app.closePage();
11 | });
12 |
13 | ui("action_back").on("touch", function(){
14 | app.closePage();
15 | });
16 |
17 | var pagedata = page.getData();
18 | var userInfo = global.getMemory("userInfo");
19 |
20 | var isMore = false;
21 | var listview = ui("do_listview");
22 | var listdata = mm("do_ListData");
23 | listview.bindItems(listdata);
24 | var listcache = sm("do_DataCache");
25 | var cachekey = "cache_inform_comment";
26 |
27 | var comment_http = mm("do_Http");
28 | var tokenUrl = $U.token($U.url.GetInforCommentList) + "&";
29 | comment_http.method = "get";
30 | comment_http.timeout = "60000";
31 | comment_http.contentType = "application/json";
32 | comment_http.on("fail", function(data){
33 | $U.fail(data, pbar, listview);
34 | }).on("success", function(data){
35 | if (pbar.visible) pbar.visible = false;
36 | else listview.rebound();
37 | if (!$U.headCodeCheck(data)) return;
38 | data = data.body.map(function(v){
39 | v.createTime = $U.time_format(v.createTime);
40 | v.icon = $U.prefix + v.icon;
41 | return v;
42 | });
43 | if (!isMore) listdata.removeAll();
44 | listdata.addData(data);
45 | listview.refreshItems();
46 | listcache.saveData({key: cachekey, value: listdata.getRange(0)});
47 | if (data.length == 0) nf.toast("暂无评论");
48 | });
49 |
50 | var body = {inforId: pagedata.id, page: 1};
51 | var binddata = function(body){
52 | if (isMore) body.page++;
53 | else body.page = 1;
54 | comment_http.url = tokenUrl + $U.queryString(body);
55 | comment_http.request();
56 | };
57 |
58 | var datacache = listcache.loadData({key: cachekey});
59 | if (datacache) {
60 | listdata.addData(datacache);
61 | listview.refreshItems();
62 | binddata(body);
63 | } else {
64 | pbar.visible = true;
65 | binddata(body);
66 | }
67 |
68 | listview.on("pull", function(data){
69 | if (data.state != 2) return;
70 | isMore = false;
71 | binddata(body);
72 | }).on("push", function(data, e){
73 | if (data.state != 2) return;
74 | isMore = true;
75 | binddata(body);
76 | });
77 |
78 | var add_http = mm("do_Http");
79 | add_http.url = $U.token($U.url.AddInforComment);
80 | add_http.method = "post";
81 | add_http.timeout = "60000";
82 | add_http.contentType = "application/json";
83 | add_http.on("fail", function(data){
84 | $U.fail(data, pbar);
85 | }).on("success", function(data){
86 | if (!$U.headCodeCheck(data)) return;
87 | tf_comment.text = "";
88 | nf.toast("评论成功");
89 | isMore = false;
90 | binddata(body);
91 | });
92 |
93 | var action_ok = ui("action_ok");
94 | var tf_comment = ui("tf_comment");
95 | action_ok.on("touch", function(){
96 | page.hideKeyboard();
97 | var body = {
98 | InformationId: pagedata.id,
99 | ReplayEmpId: userInfo.id,
100 | Message: tf_comment.text.trim()
101 | };
102 | if (body.Message == "") return nf.toast("请输入评论内容");
103 | pbar.visible = true;
104 | add_http.body = body;
105 | add_http.request();
106 | });
107 |
--------------------------------------------------------------------------------
/source/view/work/comment.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "评论",
43 | "textAlign": "center"
44 | },
45 | {
46 | "id": "action_ok",
47 | "x": "400",
48 | "width": "80",
49 | "height": "70",
50 | "type": "do_ALayout",
51 | "views": [
52 | {
53 | "id": "do_imageview_2",
54 | "x": "20",
55 | "y": "21",
56 | "width": "41",
57 | "height": "28",
58 | "type": "do_ImageView",
59 | "scale": "fillxory",
60 | "source": "source://image/feedback@send.png"
61 | }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | "id": "do_alayout_3",
68 | "x": "10",
69 | "y": "80",
70 | "width": "460",
71 | "height": "764",
72 | "bgColor": "DBDBDBFF",
73 | "type": "do_ALayout",
74 | "views": [
75 | {
76 | "id": "tf_comment",
77 | "x": "1",
78 | "y": "1",
79 | "width": "458",
80 | "height": "762",
81 | "bgColor": "FFFFFFFF",
82 | "type": "do_TextBox",
83 | "fontSize": "24",
84 | "hint": "说点儿什么吧..."
85 | }
86 | ]
87 | }
88 | ]
89 | }
90 | }
--------------------------------------------------------------------------------
/source/view/setting/feedback/feedback.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "意见反馈",
43 | "textAlign": "center"
44 | },
45 | {
46 | "id": "action_ok",
47 | "x": "400",
48 | "width": "80",
49 | "height": "70",
50 | "type": "do_ALayout",
51 | "views": [
52 | {
53 | "id": "do_imageview_2",
54 | "x": "20",
55 | "y": "21",
56 | "width": "41",
57 | "height": "28",
58 | "type": "do_ImageView",
59 | "scale": "fillxory",
60 | "source": "source://image/feedback@send.png"
61 | }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | "id": "do_alayout_3",
68 | "x": "10",
69 | "y": "80",
70 | "width": "460",
71 | "height": "764",
72 | "bgColor": "DBDBDBFF",
73 | "type": "do_ALayout",
74 | "views": [
75 | {
76 | "id": "tb_content",
77 | "x": "1",
78 | "y": "1",
79 | "width": "458",
80 | "height": "762",
81 | "bgColor": "FFFFFFFF",
82 | "type": "do_TextBox",
83 | "fontSize": "24",
84 | "hint": "说点儿什么吧..."
85 | }
86 | ]
87 | }
88 | ]
89 | }
90 | }
--------------------------------------------------------------------------------
/source/view/setting/attention/attention.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var storage = sm("do_Storage");
6 | var rootview = ui("$");
7 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
8 | var $U = require("url");
9 | var open = require("open");
10 |
11 | page.on("back", function(){
12 | app.closePage();
13 | });
14 |
15 | ui("action_back").on("touch", function(){
16 | app.closePage();
17 | });
18 |
19 | var listview = ui("do_listview");
20 | var listdata = mm("do_ListData");
21 | listview.bindItems(listdata);
22 |
23 | var contact = {
24 | source: "data://AllEmployers.zip",
25 | target: "data://",
26 | file: "data://AllEmployers.txt",
27 | detail: function(id){
28 | storage.readFile(contact.file, function(data){
29 | if (typeof data == "string") eval("data = " + data);
30 | data.forEach(function(v){
31 | if (id == v[6]) {
32 | pbar.visible = false;
33 | return open.start("source://view/contact/detail.ui", {
34 | pinyinIndex: v[0],
35 | itcodeIndex: v[1],
36 | pinyin: v[2],
37 | itcode: v[3],
38 | name: v[4],
39 | mobile: v[5],
40 | id: v[6],
41 | email: v[7],
42 | telephone: v[8],
43 | dcPosition: v[9],
44 | departname: v[10],
45 | icon: $U.prefix + v[11],
46 | nameP: v[4] + " " + v[2],
47 | itcodeP: v[6] + " " + v[3] + " " + v[9]
48 | });
49 | }
50 | })
51 | })
52 | }
53 | };
54 |
55 | if (!storage.fileExist(contact.file)) {
56 | storage.unzip(contact.source, contact.target, function(){
57 | this.deleteFile(contact.source);
58 | });
59 | }
60 |
61 | var myatt_http = mm("do_Http");
62 | myatt_http.method = "get";
63 | myatt_http.timeout = "60000";
64 | myatt_http.contentType = "application/json";
65 | myatt_http.on("fail", function(data){
66 | $U.fail(data, pbar, listview);
67 | }).on("success", function(data){
68 | if (pbar.visible) pbar.visible = false;
69 | else listview.rebound();
70 | if (!$U.headCodeCheck(data)) return;
71 | data = data.body.map(function(v){
72 | return {
73 | id: v["attentionEmpId"],
74 | icon: $U.prefix + v["attentionEmpIcon"],
75 | nameP: v["attentionEmpName"] + " " + v["attentionEmpPinYin"],
76 | itcodeP: v["attentionEmpId"] + " " + v["attentionEmpItcode"] + " " + v["attentionEmpDcposition"],
77 | departname: v["attentionEmpDepartementName"]
78 | }
79 | });
80 | listdata.removeAll();
81 | listdata.addData(data);
82 | listview.refreshItems();
83 | if (data.length == 0) nf.toast("暂无关注");
84 | });
85 |
86 | pbar.visible = true;
87 | myatt_http.url = $U.token($U.url.GetAttentionList);
88 | myatt_http.request();
89 |
90 | listview.on("touch", function(data){
91 | pbar.visible = true;
92 | data = listdata.getOne(data);
93 | contact.detail(data.id);
94 | }).on("pull", function(data){
95 | if (data.state != 2) return;
96 | myatt_http.request();
97 | });
98 |
99 | page.on("result", function(data){
100 | if (!data.work_att) return;
101 | myatt_http.request();
102 | });
--------------------------------------------------------------------------------
/source/view/work/add.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "发表",
43 | "textAlign": "center"
44 | },
45 | {
46 | "id": "action_ok",
47 | "x": "400",
48 | "width": "80",
49 | "height": "70",
50 | "type": "do_ALayout",
51 | "views": [
52 | {
53 | "id": "do_imageview_2",
54 | "x": "20",
55 | "y": "21",
56 | "width": "41",
57 | "height": "28",
58 | "type": "do_ImageView",
59 | "scale": "fillxory",
60 | "source": "source://image/feedback@send.png"
61 | }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | "id": "do_linearlayout_1",
68 | "y": "70",
69 | "width": "480",
70 | "height": "784",
71 | "bgColor": "FFFFFFFF",
72 | "type": "do_LinearLayout",
73 | "views": [
74 | {
75 | "id": "tb_message",
76 | "width": "460",
77 | "height": "300",
78 | "margin": "10,0,0,10",
79 | "type": "do_TextBox",
80 | "fontSize": "24",
81 | "hint": "这一刻的想法..."
82 | },
83 | {
84 | "id": "gv_imgs",
85 | "y": "300",
86 | "width": "480",
87 | "height": "-1",
88 | "type": "do_GridView",
89 | "numColumns": "5",
90 | "templates": "source://view/work/add_cell.ui"
91 | }
92 | ]
93 | }
94 | ]
95 | }
96 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_IndexListView.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_IndexListView",
3 | "IsContainer": "0",
4 | "Type": "UI",
5 | "Name": "带索引的ListView",
6 | "Version": "Internal",
7 | "Description": "IndexListView实际上是一个界面右边带索引的ListView,可以绑定一个HashData数据源,按下滑动右边的索引,可以快速定位到该索引下的首条数据,主要应用于通讯录,歌曲播放器等界面",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/D/20160121/do_IndexListView/索引列表indexlist.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [
30 | {
31 | "ID": "indexBarColors",
32 | "Name": "索引颜色",
33 | "Type": "String",
34 | "DefaultValue": "00000000,C0C0C0,000000,00000000",
35 | "EditType": "0",
36 | "Group": "",
37 | "Description": "包含四个颜色,分别是索引列表背景色、按下索引背景色、索引文本颜色、滑块颜色,中间用逗号隔开,仅android平台支持",
38 | "Design": {
39 | "Type": "Richtext",
40 | "Data": []
41 | }
42 | },
43 | {
44 | "ID": "selectedColor",
45 | "Name": "Cell选中的背景颜色",
46 | "Type": "String",
47 | "DefaultValue": "ffffff00",
48 | "EditType": "0",
49 | "Group": "",
50 | "Description": "设置IndexListView 的按下选择颜色,如果在模板中设置rootLayout背景颜色,将不起作用",
51 | "Design": {
52 | "Type": "Color",
53 | "Data": []
54 | }
55 | },
56 | {
57 | "ID": "templates",
58 | "Name": "Cell对应的模板UI文件组",
59 | "Type": "String",
60 | "DefaultValue": "",
61 | "EditType": "0",
62 | "Group": "",
63 | "Description": "一个IndexListView可以有多个cell模板,这个属性包含多个source://开头的ui文件,中间用逗号隔开,格式类似如下:“source://view/cell1.ui,source://view/cell2.ui,source://view/cell3.ui”",
64 | "Design": {
65 | "Type": "Richtext",
66 | "Data": []
67 | }
68 | }
69 | ],
70 | "Events": [
71 | {
72 | "ID": "longTouch",
73 | "Description": "长按cell触发",
74 | "ReturnType": "Node",
75 | "ReturnDesc": "返回data中的groupID和group下的数据index,比如['groupID':'A','index':'2']"
76 | },
77 | {
78 | "ID": "touch",
79 | "Description": "点击cell触发",
80 | "ReturnType": "Node",
81 | "ReturnDesc": "返回data中的groupID和group下的数据index,比如['groupID':'A','index':'2']"
82 | }
83 | ],
84 | "syncMethodes": [
85 | {
86 | "ID": "bindItems",
87 | "Name": "绑定item的数据",
88 | "Description": "为IndeListView绑定数据源,只支持HashData实例,其中每组第一条数据表示分组信息,不可点击",
89 | "ReturnType": "",
90 | "ReturnDesc": "",
91 | "Paras": [
92 | {
93 | "ID": "data",
94 | "Name": "数据",
95 | "Type": "Node",
96 | "Required": 1,
97 | "DefaultValue": "",
98 | "Description": "比如{'A':[{'template':0,'text':'a1'},{'template':1,'text':'a2'}],'B':[{'template':0,'text':'b1'},{'template':1,'text':'b2'}]},其中每个group下第一条数据表示分组信息,不可点击"
99 | },
100 | {
101 | "ID": "indexs",
102 | "Name": "索引的数组",
103 | "Type": "Node",
104 | "Required": 0,
105 | "DefaultValue": "",
106 | "Description": "一个数组列表,按照此列表显示列表数据,可以为空,为空就按照HashData‘随机’显示列表数据"
107 | }
108 | ]
109 | },
110 | {
111 | "ID": "refreshItems",
112 | "Name": "刷新item数据",
113 | "Description": "动态修改HashData数据源后,需要调用此方法才能正确显示数据",
114 | "ReturnType": "",
115 | "ReturnDesc": "",
116 | "Paras": []
117 | }
118 | ],
119 | "asyncMethodes": []
120 | }
--------------------------------------------------------------------------------
/source/view/inform/comment.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "评论信息",
43 | "textAlign": "center"
44 | }
45 | ]
46 | },
47 | {
48 | "id": "do_listview",
49 | "y": "70",
50 | "width": "480",
51 | "height": "704",
52 | "bgColor": "FFFFFFFF",
53 | "type": "do_ListView",
54 | "footerView": "source://view/kit/fbar.ui",
55 | "headerView": "source://view/kit/hbar.ui",
56 | "isFooterVisible": "true",
57 | "isHeaderVisible": "true",
58 | "templates": "source://view/inform/comment_cell.ui"
59 | },
60 | {
61 | "id": "do_alayout_3",
62 | "y": "774",
63 | "width": "480",
64 | "type": "do_ALayout",
65 | "views": [
66 | {
67 | "id": "tf_comment",
68 | "x": "15",
69 | "y": "15",
70 | "width": "365",
71 | "height": "50",
72 | "bgColor": "FFFFFFFF",
73 | "type": "do_TextField",
74 | "fontSize": "24",
75 | "hint": "请输入评论内容"
76 | },
77 | {
78 | "id": "action_ok",
79 | "x": "390",
80 | "y": "15",
81 | "width": "75",
82 | "height": "50",
83 | "bgColor": "FFFFFFFF",
84 | "type": "do_Button",
85 | "fontSize": "24",
86 | "text": "发送"
87 | },
88 | {
89 | "id": "line_1",
90 | "width": "480",
91 | "height": "1",
92 | "bgColor": "DBDBDBFF",
93 | "type": "do_Label"
94 | }
95 | ]
96 | }
97 | ]
98 | }
99 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_Notification.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_Notification",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "通知类",
6 | "Version": "Internal",
7 | "Description": "各种方式提醒和通知用户",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/R/20150723/4b65fbd9-a4e4-47b8-9527-c56f5baea31b.png",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "iOS7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "4.0"
16 | },
17 | "Windows": {
18 | "Support": 1,
19 | "MinVersion": "8.1"
20 | },
21 | "WindowsPhone": {
22 | "Support": 1,
23 | "MinVersion": "8.1"
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [],
31 | "syncMethodes": [
32 | {
33 | "ID": "toast",
34 | "Name": "弹出toast窗口",
35 | "Description": "支持类似Android的toast的方式,弹出一个提示框,但是很短时间内会自动消隐,x和y都不赋值,即显示默认位置",
36 | "ReturnType": "",
37 | "ReturnDesc": "",
38 | "Paras": [
39 | {
40 | "ID": "text",
41 | "Name": "toast窗口的正文",
42 | "Type": "String",
43 | "Required": 0,
44 | "DefaultValue": "",
45 | "Description": ""
46 | },
47 | {
48 | "ID": "x",
49 | "Name": "toast窗口的x坐标位置",
50 | "Type": "Number",
51 | "Required": 0,
52 | "DefaultValue": "",
53 | "Description": ""
54 | },
55 | {
56 | "ID": "y",
57 | "Name": "toast窗口的y坐标位置",
58 | "Type": "Number",
59 | "Required": 0,
60 | "DefaultValue": "",
61 | "Description": ""
62 | }
63 | ]
64 | }
65 | ],
66 | "asyncMethodes": [
67 | {
68 | "ID": "alert",
69 | "Name": "弹出alert窗口",
70 | "Description": "通过alert来提示用户,alert是模态的,只有一个确定按钮",
71 | "ReturnType": "",
72 | "ReturnDesc": "",
73 | "Paras": [
74 | {
75 | "ID": "text",
76 | "Name": "alert窗口的正文",
77 | "Type": "String",
78 | "Required": 0,
79 | "DefaultValue": "",
80 | "Description": "alert窗口的正文"
81 | },
82 | {
83 | "ID": "title",
84 | "Name": "alert窗口的标题",
85 | "Type": "String",
86 | "Required": 0,
87 | "DefaultValue": "",
88 | "Description": "alert窗口的标题"
89 | }
90 | ]
91 | },
92 | {
93 | "ID": "confirm",
94 | "Name": "弹出confirm窗口",
95 | "Description": "confirm窗口有2个按钮,可以自定义按钮的文本内容",
96 | "ReturnType": "Number",
97 | "ReturnDesc": "1 表示点击了button1按钮\r\n2 表示点击了button2按钮",
98 | "Paras": [
99 | {
100 | "ID": "text",
101 | "Name": "confirm窗口的正文",
102 | "Type": "String",
103 | "Required": 0,
104 | "DefaultValue": "",
105 | "Description": "confirm窗口的正文"
106 | },
107 | {
108 | "ID": "title",
109 | "Name": "confirm窗口的标题",
110 | "Type": "String",
111 | "Required": 0,
112 | "DefaultValue": "",
113 | "Description": "confirm窗口的标题"
114 | },
115 | {
116 | "ID": "button1text",
117 | "Name": "按钮1的文本",
118 | "Type": "String",
119 | "Required": 0,
120 | "DefaultValue": "确定",
121 | "Description": "左边按钮1的正文"
122 | },
123 | {
124 | "ID": "button2text",
125 | "Name": "按钮2的文本",
126 | "Type": "String",
127 | "Required": 0,
128 | "DefaultValue": "取消",
129 | "Description": "右边按钮2的正文"
130 | }
131 | ]
132 | }
133 | ]
134 | }
--------------------------------------------------------------------------------
/source/view/inform/detail.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "action_exit",
35 | "x": "80",
36 | "width": "60",
37 | "height": "70",
38 | "visible": "false",
39 | "type": "do_ALayout",
40 | "views": [
41 | {
42 | "id": "do_label_1",
43 | "y": "10",
44 | "width": "60",
45 | "height": "50",
46 | "type": "do_Label",
47 | "fontColor": "FFFFFFFF",
48 | "fontSize": "24",
49 | "text": "关闭"
50 | }
51 | ]
52 | },
53 | {
54 | "id": "label_title",
55 | "x": "140",
56 | "y": "10",
57 | "width": "200",
58 | "height": "50",
59 | "type": "do_Label",
60 | "fontColor": "FFFFFFFF",
61 | "fontSize": "30",
62 | "maxLines": "1",
63 | "textAlign": "center"
64 | },
65 | {
66 | "id": "action_comment",
67 | "x": "400",
68 | "width": "80",
69 | "height": "70",
70 | "visible": "false",
71 | "type": "do_ALayout",
72 | "views": [
73 | {
74 | "id": "do_imageview_2",
75 | "x": "20",
76 | "y": "18",
77 | "width": "40",
78 | "height": "36",
79 | "type": "do_ImageView",
80 | "scale": "fillxory",
81 | "source": "source://image/inform@comment.png"
82 | }
83 | ]
84 | }
85 | ]
86 | },
87 | {
88 | "id": "wv_detail",
89 | "y": "70",
90 | "width": "480",
91 | "height": "784",
92 | "type": "do_WebView"
93 | }
94 | ]
95 | }
96 | }
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_Alipay.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_Alipay",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "支付宝支付",
6 | "Version": "Internal",
7 | "Description": "调用手机支付宝客户端,完成支付功能",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/D/20160121/do_Alipay/支付.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7.0"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "14"
16 | },
17 | "Windows": {
18 | "Support": 0,
19 | "MinVersion": ""
20 | },
21 | "WindowsPhone": {
22 | "Support": 0,
23 | "MinVersion": ""
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [],
31 | "syncMethodes": [],
32 | "asyncMethodes": [
33 | {
34 | "ID": "pay",
35 | "Name": "支付",
36 | "Description": "调用支付宝支付",
37 | "ReturnType": "Node",
38 | "ReturnDesc": "{'code':'9000','msg':'success'},其中code的9000为订单支付成功,8000为正在处理中,4000为 订单支付失败,6001为用户中途取消,6002为网络连接出错",
39 | "Paras": [
40 | {
41 | "ID": "rsaPrivate",
42 | "Name": "用户私钥",
43 | "Type": "String",
44 | "Required": 1,
45 | "DefaultValue": "",
46 | "Description": "通过支付宝提供的工具生成的"
47 | },
48 | {
49 | "ID": "rsaPublic",
50 | "Name": "支付宝公钥",
51 | "Type": "String",
52 | "Required": 1,
53 | "DefaultValue": "",
54 | "Description": "通过支付宝提供的工具生成一个用户公钥,然后上传到支付宝网站,返回一个支付宝公钥"
55 | },
56 | {
57 | "ID": "partner",
58 | "Name": "合作者身份ID",
59 | "Type": "String",
60 | "Required": 1,
61 | "DefaultValue": "",
62 | "Description": "签约的支付宝账号对应的支付宝唯一用户号。以2088开头的16位纯数字组成。"
63 | },
64 | {
65 | "ID": "notifyUrl",
66 | "Name": "服务器异步通知页面路径",
67 | "Type": "String",
68 | "Required": 1,
69 | "DefaultValue": "",
70 | "Description": "支付宝服务器把处理结果返回该url,长度不能超过200个字符"
71 | },
72 | {
73 | "ID": "tradeNo",
74 | "Name": "商户网站唯一订单号",
75 | "Type": "String",
76 | "Required": 1,
77 | "DefaultValue": "",
78 | "Description": "支付宝合作商户网站唯一订单号,长度不能超过64个字符"
79 | },
80 | {
81 | "ID": "subject",
82 | "Name": "商品名称",
83 | "Type": "String",
84 | "Required": 1,
85 | "DefaultValue": "",
86 | "Description": "商品的标题/交易标题/订单标题/订单关键字等,长度不能超过128个字符"
87 | },
88 | {
89 | "ID": "sellerId",
90 | "Name": "卖家支付宝账号",
91 | "Type": "String",
92 | "Required": 1,
93 | "DefaultValue": "",
94 | "Description": "卖家支付宝账号(邮箱或手机号码格式)或其对应的支付宝唯一用户号,长度不能超过16个字符"
95 | },
96 | {
97 | "ID": "totalFee",
98 | "Name": "支付金额",
99 | "Type": "String",
100 | "Required": 1,
101 | "DefaultValue": "",
102 | "Description": "该笔订单的资金总额,单位为RMB-Yuan。取值范围为[0.01,100000000.00],精确到小数点后两位。"
103 | },
104 | {
105 | "ID": "body",
106 | "Name": "商品详情",
107 | "Type": "String",
108 | "Required": 1,
109 | "DefaultValue": "",
110 | "Description": "对一笔交易的具体描述信息。如果是多种商品,请将商品描述字符串累加传给body,长度不能超过512个字符。"
111 | },
112 | {
113 | "ID": "timeOut",
114 | "Name": "未付款交易的超时时间",
115 | "Type": "String",
116 | "Required": 0,
117 | "DefaultValue": "",
118 | "Description": "设置未付款交易的超时时间,一旦超时,该笔交易就会自动被关闭。\n当用户输入支付密码、点击确认付款后(即创建支付宝交易后)开始计时。\n取值范围:1m~15d,或者使用绝对时间(示例格式:2014-06-13 16:00:00)。\nm-分钟,h-小时,d-天,1c-当天(无论交易何时创建,都在0点关闭)。\n该参数数值不接受小数点,如1.5h,可转换为90m。"
119 | }
120 | ]
121 | }
122 | ]
123 | }
--------------------------------------------------------------------------------
/source/view/forget.ui:
--------------------------------------------------------------------------------
1 | {
2 | "RootView": {
3 | "id": "do_alayout_1",
4 | "width": "480",
5 | "height": "854",
6 | "bgColor": "F7F7F7FF",
7 | "type": "do_ALayout",
8 | "views": [
9 | {
10 | "id": "do_alayout_2",
11 | "width": "480",
12 | "height": "70",
13 | "bgColor": "E03E3FFF",
14 | "type": "do_ALayout",
15 | "views": [
16 | {
17 | "id": "action_back",
18 | "width": "80",
19 | "height": "70",
20 | "type": "do_ALayout",
21 | "views": [
22 | {
23 | "id": "do_imageview_1",
24 | "x": "30",
25 | "y": "18",
26 | "width": "18",
27 | "height": "34",
28 | "type": "do_ImageView",
29 | "source": "source://image/topbar@back.png"
30 | }
31 | ]
32 | },
33 | {
34 | "id": "label_title",
35 | "x": "100",
36 | "y": "10",
37 | "width": "280",
38 | "height": "50",
39 | "type": "do_Label",
40 | "fontColor": "FFFFFFFF",
41 | "fontSize": "30",
42 | "text": "找回密码",
43 | "textAlign": "center"
44 | }
45 | ]
46 | },
47 | {
48 | "id": "do_alayout_4",
49 | "y": "100",
50 | "width": "480",
51 | "height": "70",
52 | "bgColor": "FFFFFFFF",
53 | "type": "do_ALayout",
54 | "views": [
55 | {
56 | "id": "do_label_2",
57 | "x": "30",
58 | "y": "10",
59 | "width": "90",
60 | "height": "50",
61 | "type": "do_Label",
62 | "fontSize": "24",
63 | "text": "ID"
64 | },
65 | {
66 | "id": "tf_id",
67 | "x": "130",
68 | "y": "10",
69 | "width": "340",
70 | "height": "50",
71 | "type": "do_TextField",
72 | "fontSize": "24",
73 | "hint": "请输入您的ID",
74 | "inputType": "ASC"
75 | }
76 | ]
77 | },
78 | {
79 | "id": "action_ok",
80 | "x": "50",
81 | "y": "200",
82 | "width": "380",
83 | "height": "60",
84 | "bgColor": "E03E3FFF",
85 | "type": "do_Button",
86 | "fontColor": "FFFFFFFF",
87 | "fontSize": "24",
88 | "text": "确认"
89 | },
90 | {
91 | "id": "do_line_1",
92 | "y": "100",
93 | "width": "480",
94 | "height": "1",
95 | "bgColor": "DBDBDBFF",
96 | "type": "do_Label"
97 | },
98 | {
99 | "id": "do_line_2",
100 | "y": "170",
101 | "width": "480",
102 | "height": "1",
103 | "bgColor": "DBDBDBFF",
104 | "type": "do_Label"
105 | }
106 | ]
107 | }
108 | }
--------------------------------------------------------------------------------
/source/view/work/add.ui.js:
--------------------------------------------------------------------------------
1 | var app = sm("do_App");
2 | var page = sm("do_Page");
3 | var nf = sm("do_Notification");
4 | var global = sm("do_Global");
5 | var storage = sm("do_Storage");
6 | var camera = sm("do_Camera");
7 | var album = sm("do_Album");
8 | var rootview = ui("$");
9 | var pbar = ui(rootview.add("progressbar", "source://view/kit/pbar.ui", 0, 70));
10 | var menuor = ui(rootview.add("menuor", "source://view/kit/menu.ui", 0, 0));
11 | var $U = require("url");
12 |
13 | page.on("back", function(data){
14 | app.closePage(data);
15 | });
16 |
17 | ui("action_back").on("touch", function(){
18 | app.closePage();
19 | });
20 |
21 | var add_body = {};
22 | var add_http = mm("do_Http");
23 | add_http.url = $U.token($U.url.AddWorkCircle);
24 | add_http.method = "post";
25 | add_http.timeout = "60000";
26 | add_http.contentType = "application/json";
27 | add_http.on("fail", function(data){
28 | $U.fail(data, pbar);
29 | }).on("success", function(data){
30 | pbar.visible = false;
31 | if (!$U.headCodeCheck(data)) return;
32 | nf.toast("发表成功");
33 | page.fire("back", {work_add: true});
34 | });
35 |
36 | var hupload = mm("do_Http");
37 | hupload.url = $U.url.UploadImage;
38 | hupload.method = "post";
39 | hupload.contentType = "multipart/form-data";
40 | hupload.on("fail", function(data){
41 | $U.fail(data, pbar);
42 | }).on("success", function(data){
43 | pbar.visible = false;
44 | if (!$U.headCodeCheck(data)) return;
45 | pbar.visible = true;
46 | add_body.ImageForUploads = data.body;
47 | add_http.body = add_body;
48 | add_http.request();
49 | });
50 |
51 | var gv_imgs = ui("gv_imgs");
52 | var gv_data = mm("do_ListData");
53 | gv_imgs.bindItems(gv_data);
54 |
55 | gv_data.addData([
56 | {"$+": "+", "$s": "source://image/apps@add.png"}
57 | ]);
58 | gv_imgs.refreshItems();
59 |
60 | gv_imgs.on("touch", function(index){
61 | page.hideKeyboard();
62 | var len = gv_data.getCount() - 1;
63 | page.len = 9 - len;
64 | if (len === index) {
65 | if (len < 9) menuor.visible = true;
66 | else nf.toast("最多只能发布9张图片");
67 | } else {
68 | nf.confirm("确定放弃此图片?", function(state){
69 | if (state != 1) return;
70 | gv_data.removeData([index]);
71 | gv_imgs.refreshItems();
72 | page.len -= 1;
73 | });
74 | }
75 | });
76 |
77 | page.on("menu-listen", function(data){
78 | menuor.visible = false;
79 | var len = this.len;
80 | if (data.state == 1) {
81 | camera.capture(720, -1, 72, false, function(data){
82 | gv_data.addOne({"$+": "", "$s": data}, 0);
83 | gv_imgs.refreshItems();
84 | });
85 | } else if (data.state == 2) {
86 | album.select(len, 720, -1, 72, function(datas){
87 | if (datas.length == 0) return;
88 | gv_data.addData(datas.map(function(v, i){
89 | return {"$+": i, "$s": v};
90 | }), 0);
91 | gv_imgs.refreshItems();
92 | });
93 | }
94 | });
95 |
96 | var icons = "data://icons";
97 | var icons_zip = "data://icons.zip";
98 |
99 | var action_ok = ui("action_ok");
100 | var tb_message = ui("tb_message");
101 |
102 | action_ok.on("touch", function(){
103 | if (pbar.visible) return;
104 | page.hideKeyboard();
105 | add_body.Message = tb_message.text.trim();
106 | if (add_body.Message === "") return nf.toast("请输入发表内容");
107 | var data = [], len = gv_data.getCount() - 1;
108 | for (var i = 0; i < len;) data.push(i++);
109 | var imgs = gv_data.getData(data).map(function(v){
110 | return v["$s"];
111 | });
112 | if (imgs.length == 0) return hupload.fire("success", {head: {code: "000000"}, body: []});
113 | storage.copy(imgs, icons, function(data){
114 | this.zip(icons, icons_zip, function(data){
115 | this.deleteDir(icons);
116 | hupload.upload(icons_zip);
117 | pbar.visible = true;
118 | });
119 | });
120 | });
121 |
--------------------------------------------------------------------------------
/.metadata/app-dependency-modules/do_HuanXinIM.json:
--------------------------------------------------------------------------------
1 | {
2 | "ID": "do_HuanXinIM",
3 | "IsContainer": "0",
4 | "Type": "SM",
5 | "Name": "环信IM",
6 | "Version": "Internal",
7 | "Description": "环信即时通讯IM",
8 | "Icon": "https://deviceone.blob.core.chinacloudapi.cn/store/R/20150624/7a48cbdb-fa4a-4890-83ed-8e679d8df583.jpg",
9 | "IOS": {
10 | "Support": 1,
11 | "MinVersion": "7"
12 | },
13 | "Android": {
14 | "Support": 1,
15 | "MinVersion": "16"
16 | },
17 | "Windows": {
18 | "Support": 0,
19 | "MinVersion": ""
20 | },
21 | "WindowsPhone": {
22 | "Support": 0,
23 | "MinVersion": ""
24 | },
25 | "Html": {
26 | "Support": 1,
27 | "MinVersion": "5.0"
28 | },
29 | "Properties": [],
30 | "Events": [
31 | {
32 | "ID": "chatStatusChanged",
33 | "Description": "聊天状态改变",
34 | "ReturnType": "Number",
35 | "ReturnDesc": "1 : 已进入聊天状态; 0 : 未进入聊天状态"
36 | },
37 | {
38 | "ID": "connection",
39 | "Description": "监听连接状态",
40 | "ReturnType": "String",
41 | "ReturnDesc": "state:'1 显示帐号已经被移除 | 2 显示帐号在其他设备登陆 | 3 连接不到聊天服务器 | 4 当前网络不可用 请检查网络设置 "
42 | },
43 | {
44 | "ID": "receive",
45 | "Description": "接收到新消息触发事件",
46 | "ReturnType": "Node",
47 | "ReturnDesc": "{ from : '会话用户ID', nick : '会话用户昵称', icon:'会话用户头像', message : '会话消息内容', time : '消息发送时间' , type : '消息类型', tag : '自定义文本' }"
48 | }
49 | ],
50 | "syncMethodes": [
51 | {
52 | "ID": "enterChat",
53 | "Name": "进入聊天",
54 | "Description": "进入与指定用户发起聊天",
55 | "ReturnType": "",
56 | "ReturnDesc": "",
57 | "Paras": [
58 | {
59 | "ID": "userID",
60 | "Name": "会话用户名",
61 | "Type": "String",
62 | "Required": 1,
63 | "DefaultValue": "",
64 | "Description": "会话用户的ID"
65 | },
66 | {
67 | "ID": "userNick",
68 | "Name": "会话用户昵称",
69 | "Type": "String",
70 | "Required": 1,
71 | "DefaultValue": "",
72 | "Description": "会话用户昵称"
73 | },
74 | {
75 | "ID": "userIcon",
76 | "Name": "用户头像",
77 | "Type": "String",
78 | "Required": 0,
79 | "DefaultValue": "",
80 | "Description": "仅支持网络图片"
81 | },
82 | {
83 | "ID": "selfNick",
84 | "Name": "会话本地用户昵称",
85 | "Type": "String",
86 | "Required": 0,
87 | "DefaultValue": "",
88 | "Description": "仅支持网络图片"
89 | },
90 | {
91 | "ID": "selfIcon",
92 | "Name": "会话本地用户头像",
93 | "Type": "String",
94 | "Required": 0,
95 | "DefaultValue": "",
96 | "Description": "仅支持网络图片"
97 | },
98 | {
99 | "ID": "tag",
100 | "Name": "自定义数据",
101 | "Type": "String",
102 | "Required": 0,
103 | "DefaultValue": "",
104 | "Description": "可随消息发送到消息接受者receive监听中"
105 | }
106 | ]
107 | },
108 | {
109 | "ID": "logout",
110 | "Name": "注销用户",
111 | "Description": "",
112 | "ReturnType": "",
113 | "ReturnDesc": "",
114 | "Paras": []
115 | }
116 | ],
117 | "asyncMethodes": [
118 | {
119 | "ID": "login",
120 | "Name": "IM用户登录",
121 | "Description": "使用用户名、密码登录,需先使用环信账户创建一个应用,然后在该应用下创建或通过接口注册IM用户",
122 | "ReturnType": "Node",
123 | "ReturnDesc": "登录是否成功,{state:' 0 成功 | 1 失败 ',message:' 回执信息 '}",
124 | "Paras": [
125 | {
126 | "ID": "username",
127 | "Name": "用户名",
128 | "Type": "String",
129 | "Required": 1,
130 | "DefaultValue": "",
131 | "Description": ""
132 | },
133 | {
134 | "ID": "password",
135 | "Name": "密码",
136 | "Type": "String",
137 | "Required": 1,
138 | "DefaultValue": "",
139 | "Description": ""
140 | }
141 | ]
142 | }
143 | ]
144 | }
--------------------------------------------------------------------------------