提交 58e9e2db 编写于 作者: Z zhaoyuan17@huawei.com

delete b

Signed-off-by: Nzhaoyuan17@huawei.com <zhaoyuan17@huawei.com>
上级 93b8a9ec
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsFormSystemTestServiceB") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsFormSystemTestServiceB"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
{
"app": {
"bundleName": "com.form.formsystemtestserviceb",
"vendor": "neusoft",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 5,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.form.formsystemtestserviceb",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "formmodule001",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"visible": true,
"name": "com.form.formmodule001.FormAbility001",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:entry_MainAbility",
"type": "service",
"launchType": "standard",
"formsEnabled": true,
"forms": [
{
"name": "Form_Js001",
"description": "form_description",
"isDefault": true,
"type": "JS",
"colorMode": "auto",
"supportDimensions":[ "1*2", "2*2" ],
"defaultDimension": "1*2",
"updateEnabled": true,
"scheduledUpdateTime": "10:30",
"jsComponentName": "card",
"formVisibleNotify" : true,
"metaData": {
"customizeData": [
{
"name": "originWidgetName",
"value": "myTest"
}
]
}
}
]
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": true
}
}
]
}
}
\ No newline at end of file
import Subscriber from '@ohos.commonevent'
var JSON_DATA_COUNT = 200;
export default {
constructor(obj) {
console.log('formSystemTestServiceB: constructor ok, time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_constructor",
// (err,data) => {
// console.log("formSystemTestServiceB: constructor publish callback return! ")
// }
// );
},
updateData(obj) {
console.log('formSystemTestServiceB: updateData ok, time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_updateData",
// (err,data) => {
// console.log("formSystemTestServiceB: updateData publish callback return! ")
// }
// );
},
getDataString() {
console.log('formSystemTestServiceB: getDataString ok, time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_getDataString",
// (err,data) => {
// console.log("formSystemTestServiceB: getDataString publish callback return! ")
// }
// );
return "dataString";
},
addImageData(name, data){
console.log('formSystemTestServiceB: addImageData ok, time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_addImageData",
// (err,data) => {
// console.log("formSystemTestServiceB: addImageData publish callback return! ")
// }
// );
},
removeImageData(name){
console.log('formSystemTestServiceB: removeImageData ok, time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_removeImageData",
// (err,data) => {
// console.log("formSystemTestServiceB: removeImageData publish callback return! ")
// }
// );
},
onCreate(para) {
console.log('formSystemTestServiceB: onCreate ok, para:'+ para + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onCreate",
// (err,data) => {
// console.log("formSystemTestServiceB: onCreate publish callback return! ")
// }
// );
// return {"city":"beijing","city2":"beijing2","city3":"beijing3","city4":"beijing4","city5":"beijing5",
// "city6":"beijing6","city7":"beijing7","city8":"beijing8","city9":"beijing9","city10":"beijing10",
// "city12":"beijing12","city13":"beijing13","city14":"beijing14","city15":"beijing15",
// "city22":"beijing22","city23":"beijing23","city24":"beijing24","city25":"beijing25",
// "city32":"beijing32","city33":"beijing33","city34":"beijing34","city35":"beijing35",
// "city42":"beijing42","city43":"beijing43","city44":"beijing44","city45":"beijing45",
// "city52":"beijing52","city53":"beijing53","city54":"beijing54","city55":"beijing55",
// "city62":"beijing62","city63":"beijing63","city64":"beijing64","city65":"beijing65",
// "city72":"beijing72","city73":"beijing73","city74":"beijing74","city75":"beijing75",
// "city82":"beijing82","city83":"beijing83","city84":"beijing84","city85":"beijing85",
// "city92":"beijing92","city93":"beijing93","city94":"beijing94","city95":"beijing95",
// "city11":"beijing16","city17":"beijing18","city19":"beijing110","city11":"beijing111",
// "city21":"beijing26","city27":"beijing28","city29":"beijing210","city211":"beijing211",
// "city31":"beijing36","city37":"beijing38","city39":"beijing310","city311":"beijing311",
// "city41":"beijing46","city47":"cdbeijing48","city49":"beijing410","city11":"beijing411"
// };
var jsonData = "{";
for (var iJsonDataCount = 0; iJsonDataCount < JSON_DATA_COUNT; iJsonDataCount++) {
jsonData = jsonData + "city" + iJsonDataCount + ":" + "beijingB"+iJsonDataCount;
if ( iJsonDataCount != JSON_DATA_COUNT - 1) {
jsonData = jsonData + ", ";
}
}
jsonData = jsonData + "}";
return jsonData;
},
onDestroy(para) {
console.log('formSystemTestServiceB: onDestroy para:'+ para + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onDestroy",
// (err,data) => {
// console.log("formSystemTestServiceB: onDestroy publish callback return! ")
// }
// );
},
onDelete(formId) {
console.log('formSystemTestServiceB: onDelete ok, formId:' + formId + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onDelete",
// (err,data) => {
// console.log("formSystemTestServiceB: onDelete publish callback return! ")
// }
// );
},
onTriggerEvent(formId, message) {
console.log('formSystemTestServiceB: onTriggerEvent ok, formId:' + formId + 'message:' + message + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onTriggerEvent",
// (err,data) => {
// console.log("formSystemTestServiceB: onTriggerEvent publish callback return! ")
// }
// );
},
onUpdate(formId) {
console.log('formSystemTestServiceB: onUpdate ok, formId:' + formId + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onUpdate",
// (err,data) => {
// console.log("formSystemTestServiceB: onUpdate publish callback return! ")
// }
// );
},
onCastTemp(formId) {
console.log('formSystemTestServiceB: onCastTemp ok, formId:' + formId + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onCastTemp",
// (err,data) => {
// console.log("formSystemTestServiceB: onCastTemp publish callback return! ")
// }
// );
},
onVisibilityChanged(formEventsMap) {
console.log('formSystemTestServiceB: OnVisibilityChanged ok, map:'+ formEventsMap + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onVisibilityChanged",
// (err,data) => {
// console.log("formSystemTestServiceB: onVisibilityChanged publish callback return! ")
// }
// );
},
onAcquireState(want) {
console.log('formSystemTestServiceB: OnAcquireState ok, '+ 'want.abilityName:' + want.abilityName + ', want.bundleName:' + want.bundleName + ', time stamp:'+ Date.parse(new Date()));
// Subscriber.publish(
// "fms_serviceA_onAcquireState",
// (err,data) => {
// console.log("formSystemTestServiceB: onAcquireState publish callback return! ")
// }
// );
}
};
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #FFFFFF;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url("/common/images/Wallpaper.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #FFFFFF;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
{
"string": [
{
"name": "entry_MainAbility",
"value": "formSystemTestServiceB"
},
{
"name": "mainability_description",
"value": "JS_Empty Ability"
}
]
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册