当前位置: 首页 > news >正文

怎么轻松搭建自己的网站招聘网站分析报告怎么做

怎么轻松搭建自己的网站,招聘网站分析报告怎么做,西宁网站建设电话,.cc后缀网站1.项目介绍 该项目是记录用户日常饮食情况,以及针对不同食物摄入营养不同会有对应的营养摄入情况和日常运动消耗情况,用户可以自己添加食品以及对应的热量。 1.1登陆页 1.2饮食统计页 1.3 食物列表页 2.登陆页 2.1自定义弹框 import preferences from oh…

1.项目介绍

该项目是记录用户日常饮食情况,以及针对不同食物摄入营养不同会有对应的营养摄入情况和日常运动消耗情况,用户可以自己添加食品以及对应的热量。

1.1登陆页

在这里插入图片描述

1.2饮食统计页

在这里插入图片描述

1.3 食物列表页

在这里插入图片描述

2.登陆页

这里是引用

2.1自定义弹框

在这里插入图片描述

import preferences from '@ohos.data.preferences';
import { CommonConstants } from '../constants/CommonConstants';
import Logger from './Logger';class PreferenceUtil{private pref: preferences.Preferencesasync loadPreference(context){try { // 加载preferencesthis.pref = await preferences.getPreferences(context, CommonConstants.H_STORE)Logger.debug(`加载Preferences[${CommonConstants.H_STORE}]成功`)} catch (e) {Logger.debug(`加载Preferences[${CommonConstants.H_STORE}]失败`, JSON.stringify(e))}}async putPreferenceValue(key: string, value: preferences.ValueType){if (!this.pref) {Logger.debug(`Preferences[${CommonConstants.H_STORE}]尚未初始化!`)return}try {// 写入数据await this.pref.put(key, value)// 刷盘await this.pref.flush()Logger.debug(`保存Preferences[${key} = ${value}]成功`)} catch (e) {Logger.debug(`保存Preferences[${key} = ${value}]失败`, JSON.stringify(e))}}async getPreferenceValue(key: string, defaultValue: preferences.ValueType){if (!this.pref) {Logger.debug(`Preferences[${CommonConstants.H_STORE}]尚未初始化!`)return}try {// 读数据let value = await this.pref.get(key, defaultValue)Logger.debug(`读取Preferences[${key} = ${value}]成功`)return value} catch (e) {Logger.debug(`读取Preferences[${key}]失败`, JSON.stringify(e))}}
}const preferenceUtil = new PreferenceUtil()export default preferenceUtil as PreferenceUtil

export class CommonConstants {static readonly RDB_NAME: string = 'HealthyLife.db'; // db name// THOUSANDTHstatic readonly THOUSANDTH_15: string = '1.5%'; // ‘1.5%’static readonly THOUSANDTH_12: string = '2.2%'; // ‘2.2%’static readonly THOUSANDTH_33: string = '3.3%'; // ‘3.3%’static readonly THOUSANDTH_50: string = '5%'; // ‘5%’static readonly THOUSANDTH_66: string = '6.6%'; // ‘6.6%’static readonly THOUSANDTH_80: string = '8%'; // ‘8%’static readonly THOUSANDTH_100: string = '10%'; // ‘10%’static readonly THOUSANDTH_120: string = '12%'; // ‘12%’static readonly THOUSANDTH_160: string = '16%'; // ‘16%’static readonly THOUSANDTH_400: string = '40%'; // ‘40%’static readonly THOUSANDTH_420: string = '42%'; // ‘42%’static readonly THOUSANDTH_500: string = '50%'; // ‘50%’static readonly THOUSANDTH_560: string = '56%'; // ‘56%’static readonly THOUSANDTH_800: string = '80%'; // ‘80%’static readonly THOUSANDTH_830: string = '83%'; // ‘83%’static readonly THOUSANDTH_880: string = '88%'; // ‘88%’static readonly THOUSANDTH_900: string = '90%'; // ‘90%’static readonly THOUSANDTH_940: string = '94%'; // ‘90%’static readonly THOUSANDTH_1000: string = '100%'; // ‘100%’static readonly DEFAULT_2: number = 2;static readonly DEFAULT_6: number = 6;static readonly DEFAULT_8: number = 8;static readonly DEFAULT_12: number = 12;static readonly DEFAULT_10: number = 10;static readonly DEFAULT_16: number = 16;static readonly DEFAULT_18: number = 18;static readonly DEFAULT_20: number = 20;static readonly DEFAULT_24: number = 24;static readonly DEFAULT_28: number = 28;static readonly DEFAULT_32: number = 32;static readonly DEFAULT_48: number = 48;static readonly DEFAULT_56: number = 56;static readonly DEFAULT_60: number = 60;static readonly DEFAULT_100: number = 100;static readonly DEFAULT_180: number = 180;// fontWeightstatic readonly FONT_WEIGHT_400: number = 400;static readonly FONT_WEIGHT_500: number = 500;static readonly FONT_WEIGHT_600: number = 600;static readonly FONT_WEIGHT_700: number = 700;static readonly FONT_WEIGHT_900: number = 900;// opacitystatic readonly OPACITY_4: number = 0.4;static readonly OPACITY_6: number = 0.6;// radiusstatic readonly BORDER_RADIUS_PERCENT_50: string = '50%';// durationstatic readonly DURATION_1000: number = 1000; // 1000msstatic readonly DURATION_800: number = 800; // 700msstatic readonly DURATION_100: number = 100; // 100ms// spacestatic readonly SPACE_2: number = 2;static readonly SPACE_4: number = 4;static readonly SPACE_6: number = 6;static readonly SPACE_8: number = 8;static readonly SPACE_10: number = 10;static readonly SPACE_12: number = 12;// global data keystatic readonly H_STORE: string = 'HeimaHealthyStore';static readonly RECORD_DATE: string = 'selectedDate';static readonly PACKAGE_NAME: string = 'com.itheima.healthylife';static readonly ENTRY_ABILITY: string = 'EntryAbility';/*** 当前用户推荐的每日摄入热量上限,单位:卡路里*/static readonly RECOMMEND_CALORIE: number = 1962/*** 当前用户推荐的每日摄入碳水上限,单位:克*/static readonly RECOMMEND_CARBON: number = 237/*** 当前用户推荐的每日摄入蛋白质上限,单位:克*/static readonly RECOMMEND_PROTEIN: number = 68/*** 当前用户推荐的每日摄入脂肪上限,单位:克*/static readonly RECOMMEND_FAT: number = 53
}

import { CommonConstants } from '../../common/constants/CommonConstants'
@CustomDialog
export default struct UserPrivacyDialog {controller: CustomDialogControllerconfirm: () => voidcancel: () => voidbuild() {Column({space: CommonConstants.SPACE_10}){// 1.标题Text($r('app.string.user_privacy_title')).fontSize(20).fontWeight(CommonConstants.FONT_WEIGHT_700)// 2.内容Text($r('app.string.user_privacy_content'))// 3.按钮Button($r('app.string.agree_label')).width(150).backgroundColor($r('app.color.primary_color')).onClick(() => {this.confirm()this.controller.close()})Button($r('app.string.refuse_label')).width(150).backgroundColor($r('app.color.lightest_primary_color')).fontColor($r('app.color.light_gray')).onClick(() => {this.cancel()this.controller.close()})}.width('100%').padding(10)}
}
import common from '@ohos.app.ability.common'
import router from '@ohos.router'
import PreferenceUtil from '../common/utils/PreferenceUtil'
import UserPrivacyDialog from '../view/welcome/UserPrivacyDialog'
@Extend(Text) function opacityWhiteText(opacity: number, fontSize: number = 10) {.fontSize(fontSize).opacity(opacity).fontColor(Color.White)
}
const PREF_KEY = 'userPrivacyKey'
@Entry
@Component
struct WelcomePage {context = getContext(this) as common.UIAbilityContextcontroller: CustomDialogController = new CustomDialogController({builder: UserPrivacyDialog({confirm: () => this.onConfirm(),cancel: () => this.exitApp()})})async aboutToAppear(){// 1.加载首选项let isAgree = await PreferenceUtil.getPreferenceValue(PREF_KEY, false)// 2.判断是否同意if(isAgree){// 2.1.同意,跳转首页this.jumpToIndex()}else{// 2.2.不同意,弹窗this.controller.open()}}jumpToIndex(){setTimeout(() => {router.replaceUrl({url: 'pages/Index'})}, 1000)}onConfirm(){// 1.保存首选项PreferenceUtil.putPreferenceValue(PREF_KEY, true)// 2.跳转到首页this.jumpToIndex()}exitApp(){// 退出APPthis.context.terminateSelf()}build() {Column({ space: 10 }) {Row() {Text('健康支持').opacityWhiteText(0.8, 12)Text('IPv6').opacityWhiteText(0.8).border({ style: BorderStyle.Solid, width: 1, color: Color.White, radius: 15 }).padding({ left: 5, right: 5 })Text('网络').opacityWhiteText(0.8, 12)}Text(`'减更多'帮助更多用户实现身材管理`).opacityWhiteText(0.6)Text('备****号').opacityWhiteText(0.4).margin({ bottom: 35 })}.width('100%').height('100%').backgroundColor($r('app.color.welcome_page_background'))}
}
http://www.yayakq.cn/news/235091/

相关文章:

  • 怎样推广网站图片拼接做网站背景
  • 网站支付功能报价南京百度网站推广
  • 那种广告式网站怎么做东莞市研发网站建设品牌
  • 做网站外链wordpress 子分类
  • 摄影网站介绍网站建设项目策划书格式
  • 网站开发后台软件网站建设服务费的会计处理
  • 培训网站平台怎样做企业网站主页素描模板
  • 青海制作网站的公司wordpress展示备案号
  • 禹城做网站的网站开发类比赛
  • 网站建设有哪些种类网站套餐方案
  • 推荐网站建设服务商西安网站外包
  • 织梦做英文网站长沙做彩票网站公司
  • 泰国做网站网站icp备案怎么写
  • 网站鉴赏景区官方网站建设方案
  • 行业排名查询网站网站建设丿选择金手指15
  • 宿迁做网站多少钱wordpress 预定插件
  • 网站建设工作室图片天元建设集团有限公司单位
  • 用html做的网站加背景音乐设计网页英语
  • 广东省网站设计与开发html制作新闻信息展示页面
  • 网站建站安全需求模板制作视频免费软件
  • 网站开发刷新图片钓鱼转转网站在线生成
  • 互联网技术网站互联网网站建设彭聪
  • 请人做网站域名和主机仿 wordpress主题
  • 石家庄住建局网站网络彩票建立网站
  • 网站制作千知寻欧美简约风格网站设计
  • 如何自己制作一个网站域名备案信息查询系统
  • 企业网站建设需注意什么昆明学校网站建设
  • 如何建设企业网站ppt网站更改关键词
  • 商城网站建设价格低免费行情网站app大全
  • 做调查问卷的网站知乎建设一个网站需要什么技术指标