diff --git a/MyApplication/.gitignore b/MyApplication/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d99186e7868772e6594f4841b3f6d62e61ff3244 --- /dev/null +++ b/MyApplication/.gitignore @@ -0,0 +1,11 @@ +node_modules +/oh_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy +**/.test \ No newline at end of file diff --git a/MyApplication/AppScope/app.json5 b/MyApplication/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..5470c22e225cb61e721cda383f7074711b2b0911 --- /dev/null +++ b/MyApplication/AppScope/app.json5 @@ -0,0 +1,10 @@ +{ + "app": { + "bundleName": "com.example.myapplication", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name" + } +} diff --git a/MyApplication/AppScope/resources/base/element/string.json b/MyApplication/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..1946f13eb30ae26c426ba5ca02f0e28ddda37764 --- /dev/null +++ b/MyApplication/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "我的应用" + } + ] +} diff --git a/MyApplication/AppScope/resources/base/media/app_icon.png b/MyApplication/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/MyApplication/AppScope/resources/base/media/app_icon.png differ diff --git a/MyApplication/README.md b/MyApplication/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2ab59ac149bca2f5fb20f12b82268383741a8604 --- /dev/null +++ b/MyApplication/README.md @@ -0,0 +1,8 @@ +黑马程序员-HarmonyOS4应用开发入门与实战系列课程,ArkUI部分的代码示例,会持续更新. + + + +B站视频地址: + +https://www.bilibili.com/video/BV1Sa4y1Z7B1/?spm_id_from=333.337.search-card.all.click + diff --git a/MyApplication/build-profile.json5 b/MyApplication/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ddd824429f7085599192e3a10df27f837ff55ab1 --- /dev/null +++ b/MyApplication/build-profile.json5 @@ -0,0 +1,27 @@ +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compatibleSdkVersion": 9, + "runtimeOS": "HarmonyOS", + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/.gitignore b/MyApplication/entry/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/MyApplication/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/MyApplication/entry/build-profile.json5 b/MyApplication/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..20c75049f2d45e57d267899b6547c79fb6aa84c1 --- /dev/null +++ b/MyApplication/entry/build-profile.json5 @@ -0,0 +1,14 @@ +{ + "apiType": 'stageMode', + "buildOption": { + }, + "targets": [ + { + "name": "default", + "runtimeOS": "HarmonyOS" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/hvigorfile.ts b/MyApplication/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..80e4ec5b81689f238c34614b167a0b9e9c83e8d9 --- /dev/null +++ b/MyApplication/entry/hvigorfile.ts @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +export { hapTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/MyApplication/entry/oh-package.json5 b/MyApplication/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..248c3b7541a589682a250f86a6d3ecf7414d2d6a --- /dev/null +++ b/MyApplication/entry/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/MyApplication/entry/patch.json b/MyApplication/entry/patch.json new file mode 100644 index 0000000000000000000000000000000000000000..28961c029f5cb01579f7a5ab7fb32691eb5dbfc0 --- /dev/null +++ b/MyApplication/entry/patch.json @@ -0,0 +1,11 @@ +{ + "app": { + "bundleName": "com.example.myapplication", + "patchVersionCode": 2000035, + "versionCode": 1000000 + }, + "module": { + "name": "entry", + "type": "hotreload" + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/common/components/CommonComponents.ets b/MyApplication/entry/src/main/ets/common/components/CommonComponents.ets new file mode 100644 index 0000000000000000000000000000000000000000..4309c9af715d880abb8f93766323c6cbd86166a5 --- /dev/null +++ b/MyApplication/entry/src/main/ets/common/components/CommonComponents.ets @@ -0,0 +1,33 @@ + +import router from '@ohos.router' +@Component +export struct Header{ + private title: ResourceStr + @State params: any = router.getParams() + build(){ + // 标题部分 + Row({space: 5}){ + Image($r('app.media.ic_public_back')) + .width(30) + .onClick(() => { + // 返回前的警告 + /* router.showAlertBeforeBackPage({ + message: '支付还未完成,确定要返回吗?' + })*/ + + // 返回上一页 + router.back() + }) + if(this.params && this.title){ + Text(this.params.id + '.' + this.title) + .fontSize(28) + .fontWeight(FontWeight.Bold) + } + Blank() + Image($r('app.media.ic_public_refresh')) + .width(30) + } + .width('98%') + .height(30) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/common/util/PreferencesUtil.ts b/MyApplication/entry/src/main/ets/common/util/PreferencesUtil.ts new file mode 100644 index 0000000000000000000000000000000000000000..55213ae960d0c6be577419cdf3e53487ebf5d641 --- /dev/null +++ b/MyApplication/entry/src/main/ets/common/util/PreferencesUtil.ts @@ -0,0 +1,53 @@ +import preferences from '@ohos.data.preferences'; + +class PreferencesUtil{ + + prefMap: Map = new Map() + + async loadPreference(context, name: string){ + try { // 加载preferences + let pref = await preferences.getPreferences(context, name) + this.prefMap.set(name, pref) + console.log('testTag', `加载Preferences[${name}]成功`) + } catch (e) { + console.log('testTag', `加载Preferences[${name}]失败`, JSON.stringify(e)) + } + } + + async putPreferenceValue(name: string, key: string, value: preferences.ValueType){ + if (!this.prefMap.has(name)) { + console.log('testTag', `Preferences[${name}]尚未初始化!`) + return + } + try { + let pref = this.prefMap.get(name) + // 写入数据 + await pref.put(key, value) + // 刷盘 + await pref.flush() + console.log('testTag', `保存Preferences[${name}.${key} = ${value}]成功`) + } catch (e) { + console.log('testTag', `保存Preferences[${name}.${key} = ${value}]失败`, JSON.stringify(e)) + } + } + + async getPreferenceValue(name: string, key: string, defaultValue: preferences.ValueType){ + if (!this.prefMap.has(name)) { + console.log('testTag', `Preferences[${name}]尚未初始化!`) + return + } + try { + let pref = this.prefMap.get(name) + // 读数据 + let value = await pref.get(key, defaultValue) + console.log('testTag', `读取Preferences[${name}.${key} = ${value}]成功`) + return value + } catch (e) { + console.log('testTag', `读取Preferences[${name}.${key} ]失败`, JSON.stringify(e)) + } + } +} + +const preferencesUtil = new PreferencesUtil() + +export default preferencesUtil as PreferencesUtil \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/documentability/DocumentAbility.ts b/MyApplication/entry/src/main/ets/documentability/DocumentAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..490ca371179b39a2ad02557130d9a46b43c51ed1 --- /dev/null +++ b/MyApplication/entry/src/main/ets/documentability/DocumentAbility.ts @@ -0,0 +1,41 @@ +import UIAbility from '@ohos.app.ability.UIAbility'; +import hilog from '@ohos.hilog'; +import window from '@ohos.window'; + +export default class DocumentAbility extends UIAbility { + onCreate(want, launchParam) { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage) { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/DocumentPage', (err, data) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/MyApplication/entry/src/main/ets/entryability/EntryAbility.ets b/MyApplication/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6cb30c59f1698b2cf37ce0054372344e0c841e1 --- /dev/null +++ b/MyApplication/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,47 @@ +import UIAbility from '@ohos.app.ability.UIAbility'; +import hilog from '@ohos.hilog'; +import window from '@ohos.window';; +import PreferencesUtil from '../common/util/PreferencesUtil' +import TaskModel from '../model/TaskModel' + +export default class EntryAbility extends UIAbility { + async onCreate(want, launchParam) { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate running'); + // 加载Preferences + await PreferencesUtil.loadPreference(this.context, 'MyPreferences') + // 初始化任务表 + TaskModel.initTaskDB(this.context) + } + + onDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage) { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + windowStage.on('windowStageEvent', () =>{}) + windowStage.loadContent('pages/Index', (err, data) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/MyApplication/entry/src/main/ets/model/ShopModel.ts b/MyApplication/entry/src/main/ets/model/ShopModel.ts new file mode 100644 index 0000000000000000000000000000000000000000..dab4bdb34d07c790059097edac92a01bac75b7c6 --- /dev/null +++ b/MyApplication/entry/src/main/ets/model/ShopModel.ts @@ -0,0 +1,118 @@ +import http from '@ohos.net.http'; +import ShopInfo from '../viewmodel/ShopInfo'; +import axios from '@ohos/axios' + +class ShopModel { + baseURL: string = 'http://localhost:3000' + pageNo: number = 1 + + /** + * 基于axios实现异步查询商铺 + * @returns + */ + getShopListByAxios(): Promise { + return new Promise((resolve, reject) => { + axios.get( + `${this.baseURL}/shops`, + { + params: { pageNo: this.pageNo, pageSize: 3 } + } + ) + .then(resp => { + if (resp.status === 200) { + // 查询成功 + console.log('testTag', '查询商铺成功!', JSON.stringify(resp.data)) + resolve(resp.data) + } else { + console.log('testTag', '查询商铺信息失败!error:', JSON.stringify(resp)) + reject('查询商铺失败') + } + }) + .catch(error => { + console.log('testTag', '查询商铺信息失败!error:', JSON.stringify(error)) + reject('查询商铺失败') + }) + }) + } + + /** + * 基于ohos的http模块实现异步查询商铺 + * @returns + */ + getShopListByHttp(): Promise { + return new Promise((resolve, reject) => { + // 1.创建http的请求对象 + let httpRequest = http.createHttp() + // 2.发送请求 + httpRequest.request( + `${this.baseURL}/shops?pageNo=${this.pageNo}&pageSize=3`, + { + method: http.RequestMethod.GET + } + ) + .then(resp => { + if (resp.responseCode === 200) { + // 查询成功 + console.log('testTag', '查询商铺成功!', resp.result) + resolve(JSON.parse(resp.result.toString())) + } else { + console.log('testTag', '查询商铺信息失败!error:', JSON.stringify(resp)) + reject('查询商铺失败') + } + }) + .catch(error => { + console.log('testTag', '查询商铺信息失败!error:', JSON.stringify(error)) + reject('查询商铺失败') + }) + }) + } + + /** + * 基于axios实现同步查询商铺 + * @returns + */ + async getShopListByAxiosAsync(): Promise { + // 1.发送请求 + let resp = await axios.get( + `${this.baseURL}/shops`, + { + params: { pageNo: this.pageNo, pageSize: 3 } + } + ) + // 2.处理响应 + if (resp.status === 200) { + // 查询成功 + console.log('testTag', '查询商铺成功!', JSON.stringify(resp.data)) + return resp.data; + } + // 查询失败 + console.log('testTag', '查询商铺信息失败!error:', JSON.stringify(resp)) + } + + /** + * 基于ohos的http模块实现同步查询商铺 + * @returns + */ + async getShopListByHttpAsync(): Promise { + // 1.创建http的请求对象 + let httpRequest = http.createHttp() + // 2.发送请求 + let resp = await httpRequest.request( + `${this.baseURL}/shops?pageNo=${this.pageNo}&pageSize=3`, + { + method: http.RequestMethod.GET + } + ) + // 3.处理响应 + if (resp.responseCode === 200) { + // 查询成功 + console.log('testTag', '查询商铺成功!', resp.result) + return JSON.parse(resp.result.toString()); + } + console.log('testTag', '查询商铺信息失败!error:', JSON.stringify(resp)) + } +} + +const shopModel = new ShopModel(); + +export default shopModel as ShopModel; \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/model/TaskModel.ets b/MyApplication/entry/src/main/ets/model/TaskModel.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f16888004200936320d14164f863930b244b42b --- /dev/null +++ b/MyApplication/entry/src/main/ets/model/TaskModel.ets @@ -0,0 +1,103 @@ +import relationalStore from '@ohos.data.relationalStore'; +import TaskInfo from '../viewmodel/TaskInfo'; + +class TaskModel { + + private rdbStore: relationalStore.RdbStore + private tableName: string = 'TASK' + + /** + * 初始化任务表 + */ + initTaskDB(context){ + // 1.rdb配置 + const config = { + name: 'MyApplication.db', + securityLevel: relationalStore.SecurityLevel.S1 + } + // 2.初始化SQL语句 + const sql = `CREATE TABLE IF NOT EXISTS TASK ( + ID INTEGER PRIMARY KEY AUTOINCREMENT, + NAME TEXT NOT NULL, + FINISHED bit + )` + // 3.获取rdb + relationalStore.getRdbStore(context, config, (err, rdbStore) => { + if(err){ + console.log('testTag', '获取rdbStore失败!') + return + } + // 执行Sql + rdbStore.executeSql(sql) + console.log('testTag', '创建task表成功!') + // 保存rdbStore + this.rdbStore = rdbStore + }) + } + + /** + * 查询任务列表 + */ + async getTaskList(){ + // 1.构建查询条件 + let predicates = new relationalStore.RdbPredicates(this.tableName) + // 2.查询 + let result = await this.rdbStore.query(predicates, ['ID', 'NAME', 'FINISHED']) + // 3.解析查询结果 + // 3.1.定义一个数组,组装最终的查询结果 + let tasks: TaskInfo[] = [] + // 3.2.遍历封装 + while(!result.isAtLastRow){ + // 3.3.指针移动到下一行 + result.goToNextRow() + // 3.4.获取数据 + let id = result.getLong(result.getColumnIndex('ID')) + let name = result.getString(result.getColumnIndex('NAME')) + let finished = result.getLong(result.getColumnIndex('FINISHED')) + // 3.5.封装到数组 + tasks.push({id, name, finished: !!finished}) + } + console.log('testTag', '查询到数据:', JSON.stringify(tasks)) + return tasks + } + + /** + * 添加一个新的任务 + * @param name 任务名称 + * @returns 任务id + */ + addTask(name: string): Promise{ + return this.rdbStore.insert(this.tableName, {name, finished: false}) + } + + /** + * 根据id更新任务状态 + * @param id 任务id + * @param finished 任务是否完成 + */ + updateTaskStatus(id: number, finished: boolean) { + // 1.要更新的数据 + let data = {finished} + // 2.更新的条件 + let predicates = new relationalStore.RdbPredicates(this.tableName) + predicates.equalTo('ID', id) + // 3.更新操作 + return this.rdbStore.update(data, predicates) + } + + /** + * 根据id删除任务 + * @param id 任务id + */ + deleteTaskById(id: number){ + // 1.删除的条件 + let predicates = new relationalStore.RdbPredicates(this.tableName) + predicates.equalTo('ID', id) + // 2.删除操作 + return this.rdbStore.delete(predicates) + } +} + +let taskModel = new TaskModel(); + +export default taskModel as TaskModel; diff --git a/MyApplication/entry/src/main/ets/myabilitystage/MyAbilityStage.ts b/MyApplication/entry/src/main/ets/myabilitystage/MyAbilityStage.ts new file mode 100644 index 0000000000000000000000000000000000000000..82943de50998444cee6d035f73141dbda0ee88a6 --- /dev/null +++ b/MyApplication/entry/src/main/ets/myabilitystage/MyAbilityStage.ts @@ -0,0 +1,11 @@ +import AbilityStage from '@ohos.app.ability.AbilityStage'; +import Want from '@ohos.app.ability.Want'; + +export default class MyAbilityStage extends AbilityStage { + onAcceptWant(want: Want): string { + if(want.abilityName === 'DocumentAbility'){ + return `DocAbilityInstance_${want.parameters.instanceKey}` + } + return '' + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/AnimationPage.ets b/MyApplication/entry/src/main/ets/pages/AnimationPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..121aa11ccf9d6b30328e38d5baf62d8abecb5592 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/AnimationPage.ets @@ -0,0 +1,109 @@ +import router from '@ohos.router' +@Entry +@Component +struct AnimationPage { + // 小鱼坐标 + @State fishX: number = 200 + @State fishY: number = 180 + // 小鱼角度 + @State angle: number = 0 + // 小鱼图片 + @State src: Resource = $r('app.media.fish') + + // 是否开始游戏 + @State isBegin: boolean = false + + build() { + Row() { + Stack(){ + // 返回按钮 + Button('返回') + .position({x:0, y: 0}) + .backgroundColor('#20101010') + .onClick(() => { + // 返回上一页 + router.back() + }) + + if(!this.isBegin){ + // 开始按钮 + Button('开始游戏') + .onClick(() => { + animateTo( + {duration: 1000}, + () => { + // 点击后显示小鱼 + this.isBegin = true + } + ) + }) + }else{ + // 小鱼图片 + Image(this.src) + .position({x: this.fishX - 20, y: this.fishY - 20}) + .rotate({angle:this.angle, centerX: '50%', centerY: '50%'}) + .width(40) + .height(40) + //.animation({duration: 500, curve: Curve.Smooth}) + .transition({ + type: TransitionType.Insert, + opacity: 0, + translate: {x: -250} + }) + } + // 操作按钮 + Row(){ + Button('←').backgroundColor('#20101010') + .onClick(() => { + animateTo( + {duration: 500}, + () => { + this.fishX -= 20 + this.src = $r('app.media.fish_rev') + } + ) + }) + Column({space: 40}){ + Button('↑').backgroundColor('#20101010') + .onClick(() => { + animateTo( + {duration: 500}, + () => { + this.fishY -= 20 + } + ) + }) + Button('↓').backgroundColor('#20101010') + .onClick(() => { + animateTo( + {duration: 500}, + () => { + this.fishY += 20 + } + ) + }) + } + Button('→').backgroundColor('#20101010') + .onClick(() => { + animateTo( + {duration: 500}, + () => { + this.fishX += 20 + this.src = $r('app.media.fish') + } + ) + }) + } + .height(240) + .width(240) + .justifyContent(FlexAlign.Center) + .position({x:0,y:120}) + } + .height('100%').width('100%') + } + .height('100%') + .width('100%') + .backgroundImage($r('app.media.sea')) + .backgroundImageSize({height: '105%', width: '100%'}) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/AnimationPage2.ets b/MyApplication/entry/src/main/ets/pages/AnimationPage2.ets new file mode 100644 index 0000000000000000000000000000000000000000..47f4f4589736d874f03aa4c8cd9bec0888a272aa --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/AnimationPage2.ets @@ -0,0 +1,170 @@ +import router from '@ohos.router' +import curves from '@ohos.curves' + +@Entry +@Component +struct AnimationPage { + // 小鱼坐标 + @State fishX: number = 200 + @State fishY: number = 120 + // 小鱼角度 + @State angle: number = 0 + // 小鱼图片 + @State src: Resource = $r('app.media.fish') + + // 是否开始游戏 + @State isBegin: boolean = false + + // 摇杆中心区域坐标 + private centerX: number = 120 + private centerY: number = 120 + + // 大、小圆半径 + private maxRadius: number = 100 + private radius: number = 20 + + // 摇杆小圆球初始位置 + @State positionX: number = this.centerX; + @State positionY: number = this.centerY; + + // 角度正弦和余弦 + sin: number = 0 + cos: number = 0 + + // 小鱼移动速度 + speed: number = 0 + // 任务id + taskId: number = -1 + + + build() { + Row() { + Stack(){ + // 返回按钮 + Button('返回') + .position({x:0, y: 0}) + .backgroundColor('#20101010') + .onClick(() => { + // 返回上一页 + router.back() + }) + + // 开始按钮和小鱼 + if(!this.isBegin){ + // 开始按钮 + Button('开始游戏') + .onClick(() => { + animateTo( + {duration: 1000}, + () => { + // 点击后显示小鱼 + this.isBegin = true + } + ) + }) + }else{ + // 小鱼图片 + Image(this.src) + .position({x: this.fishX - 20, y: this.fishY - 20}) + .rotate({angle:this.angle, centerX: '50%', centerY: '50%'}) + .width(40) + .height(40) + .transition({ + type: TransitionType.Insert, + opacity: 0, + translate: {x: -250} + }) + } + + // 摇杆 + Row(){ + Circle({width: this.maxRadius * 2, height: this.maxRadius * 2}) + .fill('#20101010') + .position({ x: this.centerX-this.maxRadius, y: this.centerY-this.maxRadius }) + Circle({ width: this.radius * 2, height: this.radius * 2 }) + .fill('#403A3A3A') + .position({ x: this.positionX - this.radius, y: this.positionY - this.radius}) + } + .height(240) + .width(240) + .justifyContent(FlexAlign.Center) + .position({x:0,y:120}) + .onTouch(this.handleTouchEvent.bind(this)) + } + .height('100%').width('100%') + } + .height('100%') + .width('100%') + .backgroundImage($r('app.media.sea')) + .backgroundImageSize({height: '105%', width: '100%'}) + } + + // 处理手指移动的事件 + handleTouchEvent(event: TouchEvent){ + switch (event.type){ + case TouchType.Up: + // 还原小鱼速度 + this.speed = 0 + // 取消定时任务 + clearInterval(this.taskId) + // 还原摇杆小球的坐标 + animateTo( + {curve: curves.springMotion()}, + () => { + this.positionX = this.centerX + this.positionY = this.centerY + + this.angle = 0 + } + ) + break + case TouchType.Down: + // 开始定时任务 + this.taskId = setInterval(() => { + this.fishX += this.speed * this.cos + this.fishY += this.speed * this.sin + }, 40) + break + + case TouchType.Move: + // 1.获取手指位置坐标 + let x = event.touches[0].x + let y = event.touches[0].y + // 2.计算手指与中心点的坐标差值 + let vx = x - this.centerX + let vy = y - this.centerY + // 3.计算手指与中心点连线和x轴正半轴的夹角,单位是弧度 + let angle = Math.atan2(vy, vx) + // 4.计算手指与中心点的距离 + let distance = this.getDistance(vx, vy) + + this.sin = Math.sin(angle) + this.cos = Math.cos(angle) + animateTo( + {curve: curves.responsiveSpringMotion()}, + () => { + // 5.计算摇杆小球的坐标 + this.positionX = this.centerX + distance * this.cos + this.positionY = this.centerY + distance * this.sin + + // 6.修改小鱼的角度 + if(Math.abs(angle * 2) < Math.PI){ + this.src = $r('app.media.fish') + }else{ + this.src = $r('app.media.fish_rev') + angle = angle < 0 ? angle + Math.PI : angle - Math.PI + } + this.angle = angle * 180 / Math.PI + + this.speed = 5 + } + ) + break + } + } + + getDistance(x: number, y: number){ + let d = Math.sqrt(x * x + y * y) + return Math.min(d, this.maxRadius) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/DocumentListPage.ets b/MyApplication/entry/src/main/ets/pages/DocumentListPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..020862bab75b5ed621ed716d85679c6b21bd5cbe --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/DocumentListPage.ets @@ -0,0 +1,67 @@ +import common from '@ohos.app.ability.common' +import Want from '@ohos.app.ability.Want' +import { Header } from '../common/components/CommonComponents' +@Entry +@Component +struct DocumentListPage { + private index: number = 1 + @State docs: number[] = [] + + private context = getContext(this) as common.UIAbilityContext + + build() { + Row() { + Column({space: 10}) { + Header({title: '文档列表'}) + Divider() + Button('新建文档') + .onClick(() => { + // 添加文档 + this.docs.push(this.index) + // 跳转到文档编辑的 UIAbility + + // 跳转的目的地want + let want: Want = { + deviceId: '', + bundleName: 'com.example.myapplication', + moduleName: 'entry', + abilityName: 'DocumentAbility', + parameters: { + instanceKey: 'idx_' + this.index++ + } + } + // 跳转 + this.context.startAbility(want) + }) + ForEach(this.docs, id => { + Row({space:10}){ + Image($r('app.media.ic_files_doc')) + .width(20) + Text(`文档${id}`) + .fontSize(18) + .onClick(() => { + // 跳转到文档编辑的 UIAbility + + // 跳转的目的地want + let want: Want = { + deviceId: '', + bundleName: 'com.example.myapplication', + moduleName: 'entry', + abilityName: 'DocumentAbility', + parameters: { + instanceKey: 'idx_' + id + } + } + // 跳转 + this.context.startAbility(want) + }) + } + .width('100%') + }) + } + .width('100%') + .height('100%') + .padding(20) + } + } +} diff --git a/MyApplication/entry/src/main/ets/pages/DocumentPage.ets b/MyApplication/entry/src/main/ets/pages/DocumentPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb445b1f594dcbcc32d18a01f0e2ef5010320b83 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/DocumentPage.ets @@ -0,0 +1,61 @@ + +import common from '@ohos.app.ability.common' +import Want from '@ohos.app.ability.Want' + +@Entry +@Component +struct DocumentPage { + private context = getContext(this) as common.UIAbilityContext + @State editTitle: boolean = true + @State title: string = '标题' + @State content: string = '' + + build() { + Row() { + Column({ space: 10 }) { + Row({ space: 10 }) { + Image($r('app.media.ic_public_back')) + .width(30) + .onClick(() => { + // 跳转到文档列表的 UIAbility + let want: Want = { + deviceId: '', + bundleName: 'com.example.myapplication', + moduleName: 'entry', + abilityName: 'EntryAbility' + } + // 跳转 + this.context.startAbility(want) + }) + if (!this.editTitle) { + Text(this.title) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick(() => this.editTitle = true) + } else { + TextInput({ + placeholder: '请输入标题', + text: this.title + }) + .layoutWeight(1) + .onChange(val => this.title = val) + Button('确定') + .onClick(() => this.editTitle = false) + } + } + .width('100%') + + Divider() + TextArea({ + placeholder: '请输入文档内容', + text: this.content + }) + .layoutWeight(1) + .onChange(val => this.content = val) + } + .padding(10) + .width('100%') + .height('100%') + } + } +} diff --git a/MyApplication/entry/src/main/ets/pages/ImagePage.ets b/MyApplication/entry/src/main/ets/pages/ImagePage.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef90a460fcf0b18f5a3390b98075210193805fe8 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/ImagePage.ets @@ -0,0 +1,80 @@ +import { Header } from '../common/components/CommonComponents'; + +@Entry +@Component +struct Index { + @State imageWidth: number = 150 + + build() { + Column() { + Header({title: '图片案例'}) + Row(){ + Image($r('app.media.icon')) + .width(this.imageWidth) + } + .width('100%') + .height(400) + .justifyContent(FlexAlign.Center) + + Row(){ + Text($r('app.string.width_label')) + .fontSize(20) + .fontWeight(FontWeight.Bold) + + TextInput({text: this.imageWidth.toFixed(0)}) + .width(150) + .backgroundColor('#FFF') + .type(InputType.Number) + .onChange( value => { + this.imageWidth = parseInt(value) + }) + } + .width('100%') + .padding({left: 14, right: 14}) + .justifyContent(FlexAlign.SpaceBetween) + + Divider() + .width('91%') + + Row(){ + Button('缩小') + .width(80) + .fontSize(20) + .onClick(() => { + if(this.imageWidth >= 10){ + this.imageWidth -= 10 + } + }) + + Button('放大') + .width(80) + .fontSize(20) + .onClick(() => { + if(this.imageWidth < 300){ + this.imageWidth += 10 + } + }) + } + .width('100%') + .margin({ top: 35, bottom: 35 }) + .justifyContent(FlexAlign.SpaceEvenly) + + + Slider({ + min: 100, + max: 300, + value: this.imageWidth, + step: 10, + }) + .width('100%') + .blockColor('#36D') + .trackThickness(5) + .showTips(true) + .onChange(value => { + this.imageWidth = value + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/Index.ets b/MyApplication/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d4888f1165df7f8d7f33e0ee1aa15fad8e464b0 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,87 @@ +import RouterInfo from '../viewmodel/RouterInfo' +import IndexFontSizePanel from '../views/IndexFontSizePanel' +import RouterItem from '../views/RouterItem' +import PreferencesUtil from '../common/util/PreferencesUtil' + +const routers: RouterInfo[] = [ + new RouterInfo('pages/ImagePage', '图片查看案例'), + new RouterInfo('pages/ItemPage', '商品列表案例'), + new RouterInfo('pages/StatePage', 'Jack和他的女友案例'), + new RouterInfo('pages/PropPage', '任务列表案例'), + new RouterInfo('pages/AnimationPage', '小鱼动画案例按钮版'), + new RouterInfo('pages/AnimationPage2', '小鱼动画案例摇杆版'), + new RouterInfo('pages/LifeCirclePage', '生命周期案例1'), + new RouterInfo('pages/TestPage1', '生命周期案例2'), + new RouterInfo('pages/DocumentListPage', 'UIAbility启动模式案例'), + new RouterInfo('pages/ShopPage', '查询商铺案例'), + new RouterInfo('pages/TaskManagePage', '任务列表持久化案例'), + new RouterInfo('pages/NotificationPage', '通知案例'), +] + +@Entry +@Component +struct Index { + @State message: string = '页面列表' + @State showPanel: boolean = false + @Provide fontSize: number = 16 + + async aboutToAppear(){ + this.fontSize = await PreferencesUtil.getPreferenceValue('MyPreferences', 'IndexFontSize', 16) as number + } + + build() { + Column() { + // 顶部标题 + this.Title() + + // 导航列表 + this.RouterList() + + // 字体修改面板 + if(this.showPanel){ + IndexFontSizePanel() + .transition({ + translate: { y: 115 } + }) + } + } + .width('100%') + .height('100%') + } + + @Builder + Title() { + Row() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .height(80) + Image($r('app.media.ic_public_settings')) + .width(30) + .onClick(() => { + animateTo({ duration: 500, curve: Curve.EaseOut }, () => this.showPanel = !this.showPanel) + }) + } + .justifyContent(FlexAlign.SpaceAround) + .width('100%') + } + + @Builder + RouterList() { + List({ space: 15 }) { + ForEach( + routers, + (router, index) => { + ListItem() { + RouterItem({ r: router, i: index + 1 }) + } + } + ) + } + .layoutWeight(1) + .alignListItem(ListItemAlign.Center) + .width('100%') + } + + +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/ItemPage.ets b/MyApplication/entry/src/main/ets/pages/ItemPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..674567c1df8fc9c7028b437511e838fe6aee717d --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/ItemPage.ets @@ -0,0 +1,150 @@ +class Item { + name: string + image: ResourceStr + price: number + discount: number + + constructor(name: string, image: ResourceStr, price: number, discount: number = 0) { + this.name = name + this.image = image + this.price = price + this.discount = discount + } +} + +import {Header} from '../common/components/CommonComponents' + +/*// 全局自定义构建函数 +@Builder function ItemCard(item: Item){ + Row({space: 10}){ + Image(item.image) + .width(100) + Column({space: 4}){ + if(item.discount){ + Text(item.name) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Text('原价:¥' + item.price) + .fontColor('#CCC') + .fontSize(14) + .decoration({type: TextDecorationType.LineThrough}) + Text('折扣价:¥' + (item.price - item.discount)) + .fontColor('#F36') + .fontSize(18) + Text('补贴:¥' + item.discount) + .fontColor('#F36') + .fontSize(18) + }else{ + Text(item.name) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Text('¥' + item.price) + .fontColor('#F36') + .fontSize(18) + } + } + .height('100%') + .alignItems(HorizontalAlign.Start) + } + .width('100%') + .backgroundColor('#FFF') + .borderRadius(20) + .height(120) + .padding(10) +}*/ + +/*// 全局公共样式函数 +@Styles function fillScreen(){ + .width('100%') + .height('100%') + .backgroundColor('#EFEFEF') + .padding(20) +}*/ + +// 继承模式,只能写在全局 +@Extend(Text) function priceText(){ + .fontColor('#F36') + .fontSize(18) +} + +@Entry +@Component +struct ItemPage { + + // 商品数据 + private items: Array = [ + new Item('华为Mate60', $r('app.media.mate60'),6999, 500), + new Item('MateBookProX', $r('app.media.mateBookProX'),13999), + new Item('WatchGT4', $r('app.media.watchGT4'),1438), + new Item('FreeBuds Pro3', $r('app.media.freeBudsPro3'),1499), + new Item('Mate X5', $r('app.media.mateX5'),12999) + ] + + // 局部公共样式函数 + @Styles fillScreen(){ + .width('100%') + .height('100%') + .backgroundColor('#EFEFEF') + .padding(20) +} + + build() { + Column({space: 8}){ + // 标题部分 + Header({title: '商品列表'}) + .margin({bottom: 20}) + + // 商品列表部分 + List({space: 8}){ + ForEach( + this.items, + (item: Item) => { + ListItem(){ + this.ItemCard(item) + } + } + ) + } + .width('100%') + .layoutWeight(1) + + } + .fillScreen() + } + + // 局部自定义构建函数 + @Builder ItemCard(item: Item){ + Row({space: 10}){ + Image(item.image) + .width(100) + Column({space: 4}){ + if(item.discount){ + Text(item.name) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Text('原价:¥' + item.price) + .fontColor('#CCC') + .fontSize(14) + .decoration({type: TextDecorationType.LineThrough}) + Text('折扣价:¥' + (item.price - item.discount)) + .priceText() + Text('补贴:¥' + item.discount) + .priceText() + }else{ + Text(item.name) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Text('¥' + item.price) + .priceText() + } + } + .height('100%') + .alignItems(HorizontalAlign.Start) + } + .width('100%') + .backgroundColor('#FFF') + .borderRadius(20) + .height(120) + .padding(10) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/LifeCirclePage.ets b/MyApplication/entry/src/main/ets/pages/LifeCirclePage.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ad294ba8e54247ac72e884f1b72f285da5e01eb --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/LifeCirclePage.ets @@ -0,0 +1,109 @@ +import { Header } from '../common/components/CommonComponents' + +@Entry +@Component +struct LifeCircle { + @State show: boolean = false + @State arr: string[] = [] + + + tag: string = 'Life Circle Page' + + aboutToAppear(){ + console.log(this.tag, 'about to appear') + } + + onPageShow(){ + console.log(this.tag, 'on page show') + } + + onBackPress(){ + console.log(this.tag, 'on back press') + } + + onPageHide(){ + console.log(this.tag, 'on page hide') + } + + aboutToDisappear(){ + console.log(this.tag, 'about to disappear') + } + + build() { + Column({space: 20}) { + // 顶部标题 + Header({ title: '测试组件生命周期' }) + + // 按钮 + Button('切换显示') + .onClick(() => this.show = !this.show) + + Row(){ + if(this.show){ + MyText({message: 'Hello World!'}) + } + } + .height(30) + + // 新增按钮 + Button('新增数据') + .onClick(() => this.arr.push('user_' + this.arr.length)) + ForEach(this.arr, (item, index) => { + MyText({message: item, index: index, delete: this.delete.bind(this)}) + }) + } + .width('100%') + .height('100%') + } + + delete(index: number = -1){ + if(index > -1){ + this.arr.splice(index, 1) + } + } +} + +@Component +struct MyText { + message: string + index?: number + delete?: (index: number) => void + + + tag: string = 'MyText Page' + + aboutToAppear(){ + console.log(this.tag, 'about to appear') + } + + onPageShow(){ + console.log(this.tag, 'on page show') + } + + onBackPress(){ + console.log(this.tag, 'on back press') + } + + onPageHide(){ + console.log(this.tag, 'on page hide') + } + + aboutToDisappear(){ + console.log(this.tag, 'about to disappear') + } + + + build() { + Row(){ + Text(this.message) + .fontSize(20) + if(this.delete){ + Image($r('app.media.ic_public_delete')) + .width(20) + .onClick(() => this.delete(this.index)) + } + } + .width('100%') + .justifyContent(FlexAlign.SpaceAround) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/NotificationPage.ets b/MyApplication/entry/src/main/ets/pages/NotificationPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c23a0570303ba6f724adb343addc63d01a2ff75 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/NotificationPage.ets @@ -0,0 +1,130 @@ +import notify from '@ohos.notificationManager' +import image from '@ohos.multimedia.image' +import DownloadCard from '../views/notification/DownloadCard' +import { Header } from '../common/components/CommonComponents' + +@Entry +@Component +struct NotificationPage { + // 全局任务id + idx: number = 100 + // 图象 + pixel: PixelMap + + async aboutToAppear() { + // 获取资源管理器 + let rm = getContext(this).resourceManager; + // 读取图片 + let file = await rm.getMediaContent($r('app.media.watchGT4')) + // 创建PixelMap + image.createImageSource(file.buffer).createPixelMap() + .then(value => this.pixel = value) + .catch(reason => console.log('testTag', '加载图片异常', JSON.stringify(reason))) + } + + build() { + Column({space: 20}) { + Header({title: '通知功能'}) + + Button(`发送normalText通知`) + .onClick(() => this.publishNormalTextNotification()) + Button(`发送longText通知`) + .onClick(() => this.publishLongTextNotification()) + Button(`发送multiLine通知`) + .onClick(() => this.publishMultiLineNotification()) + Button(`发送Picture通知`) + .onClick(() => this.publishPictureNotification()) + + // 下载功能卡片 + DownloadCard() + } + .width('100%') + .height('100%') + .padding(5) + .backgroundColor('#f1f2f3') + } + + publishNormalTextNotification() { + let request: notify.NotificationRequest = { + id: this.idx++, + content: { + contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: '通知标题' + this.idx, + text: '通知内容详情', + additionalText: '通知附加内容' + } + }, + showDeliveryTime: true, + deliveryTime: new Date().getTime(), + groupName: 'wechat', + slotType: notify.SlotType.SOCIAL_COMMUNICATION + } + this.publish(request) + } + + publishLongTextNotification() { + let request: notify.NotificationRequest = { + id: this.idx++, + content: { + contentType: notify.ContentType.NOTIFICATION_CONTENT_LONG_TEXT, + longText: { + title: '通知标题' + this.idx, + text: '通知内容详情', + additionalText: '通知附加内容', + longText: '通知中的长文本,我很长,我很长,我很长,我很长,我很长,我很长,我很长', + briefText: '通知概要和总结', + expandedTitle: '通知展开时的标题' + this.idx + } + } + } + this.publish(request) + } + + publishMultiLineNotification() { + let request: notify.NotificationRequest = { + id: this.idx++, + content: { + contentType: notify.ContentType.NOTIFICATION_CONTENT_MULTILINE, + multiLine: { + title: '通知标题' + this.idx, + text: '通知内容详情', + additionalText: '通知附加内容', + briefText: '通知概要和总结', + longTitle: '展开时的标题,我很宽,我很宽,我很宽', + lines: [ + '第一行', + '第二行', + '第三行', + '第四行', + ] + } + } + } + this.publish(request) + } + + publishPictureNotification() { + let request: notify.NotificationRequest = { + id: this.idx++, + content: { + contentType: notify.ContentType.NOTIFICATION_CONTENT_PICTURE, + picture: { + title: '通知标题' + this.idx, + text: '通知内容详情', + additionalText: '通知附加内容', + briefText: '通知概要和总结', + expandedTitle: '展开后标题' + this.idx, + picture: this.pixel + } + } + } + this.publish(request) + } + + private publish(request: notify.NotificationRequest) { + notify.publish(request) + .then(() => console.log('notify test', '发送通知成功')) + .then(reason => console.log('notify test', '发送通知失败', JSON.stringify(reason))) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/PropPage.ets b/MyApplication/entry/src/main/ets/pages/PropPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4eaadc06e36a0cb34d1a91f8414ad570fcc959d --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/PropPage.ets @@ -0,0 +1,175 @@ +import { Header } from '../common/components/CommonComponents'; +// 任务类 +@Observed +class Task{ + static id: number = 1 + // 任务名称 + name: string = `任务${Task.id++}` + // 任务状态:是否完成 + finished: boolean = false +} + +// 统一的卡片样式 +@Styles function card(){ + .width('95%') + .padding(20) + .backgroundColor(Color.White) + .borderRadius(15) + .shadow({radius: 6, color: '#1F000000', offsetX: 2, offsetY: 4}) +} + +// 任务完成样式 +@Extend(Text) function finishedTask(){ + .decoration({type:TextDecorationType.LineThrough}) + .fontColor('#B1B2B1') +} + +// 任务统计信息 +class StatInfo { + totalTask: number = 0 + finishTask: number = 0 +} + +@Entry +@Component +struct PropPage { + // 统计信息 + @Provide stat: StatInfo = new StatInfo() + + build() { + Column({space: 10}){ + Header() + + // 1.任务进度卡片 + TaskStatistics() + + // 2.任务列表 + TaskList() + } + .width('100%') + .height('100%') + .backgroundColor('#F1F2F3') + } +} + + +@Component +struct TaskStatistics { + @Consume stat: StatInfo + + build() { + Row(){ + Text('任务进度:') + .fontSize(30) + .fontWeight(FontWeight.Bold) + Stack(){ + Progress({ + value: this.stat.finishTask, + total: this.stat.totalTask, + type: ProgressType.Ring + }) + .width(100) + Row(){ + Text(this.stat.finishTask.toString()) + .fontSize(24) + .fontColor('#36D') + Text(' / ' + this.stat.totalTask.toString()) + .fontSize(24) + } + } + } + .card() + .margin({top: 5, bottom: 10}) + .justifyContent(FlexAlign.SpaceEvenly) + } +} + +@Component +struct TaskList { + // 总任务数量 + @Consume stat: StatInfo + // 任务数组 + @State tasks: Task[] = [] + + handleTaskChange(){ + // 1.更新任务总数量 + this.stat.totalTask = this.tasks.length + // 2.更新已完成任务数量 + this.stat.finishTask = this.tasks.filter(item => item.finished).length + } + + build() { + Column(){ + // 2.新增任务按钮 + Button('新增任务') + .width(200) + .margin({bottom: 10}) + .onClick(() => { + // 1.新增任务数据 + this.tasks.push(new Task()) + // 2.更新任务总数量 + this.handleTaskChange() + }) + + // 3.任务列表 + List({space: 10}){ + ForEach( + this.tasks, + (item: Task, index) => { + ListItem(){ + TaskItem({item: item, onTaskChange: this.handleTaskChange.bind(this)}) + } + .swipeAction({end: this.DeleteButton(index)}) + } + ) + } + .width('100%') + .layoutWeight(1) + .alignListItem(ListItemAlign.Center) + } + } + + @Builder DeleteButton(index: number){ + Button(){ + Image($r('app.media.ic_public_delete_filled')) + .fillColor(Color.White) + .width(20) + } + .width(40) + .height(40) + .type(ButtonType.Circle) + .backgroundColor(Color.Red) + .margin(5) + .onClick(() => { + this.tasks.splice(index, 1) + this.handleTaskChange() + }) + } +} + +@Component +struct TaskItem { + @ObjectLink item: Task + onTaskChange: () => void + + build() { + Row(){ + if(this.item.finished){ + Text(this.item.name) + .finishedTask() + }else{ + Text(this.item.name) + } + Checkbox() + .select(this.item.finished) + .onChange(val => { + // 1.更新当前任务状态 + this.item.finished = val + // 2.更新已完成任务数量 + this.onTaskChange() + }) + } + .card() + .justifyContent(FlexAlign.SpaceBetween) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/ShopPage.ets b/MyApplication/entry/src/main/ets/pages/ShopPage.ets new file mode 100644 index 0000000000000000000000000000000000000000..3888fef68e5f82a13dd3536b1def63244cc3c50d --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/ShopPage.ets @@ -0,0 +1,66 @@ +import { Header } from '../common/components/CommonComponents' +import ShopInfo from '../viewmodel/ShopInfo' +import ShopItem from '../views/ShopItem' +import ShopModel from '../model/ShopModel' + +@Entry +@Component +struct ShopPage { + @State shops: ShopInfo[] = [] + isLoading: boolean = false + isMore: boolean = true + + aboutToAppear() { + // 加载商品数据 + this.loadShopInfo() + } + + build() { + Column({ space: 10 }) { + Header({ title: '商铺列表' }) + + List({ space: 10 }) { + ForEach(this.shops, shop => { + ListItem() { + ShopItem({ shop: shop }) + } + }) + } + .width('100%') + .layoutWeight(1) + .onReachEnd(() => { + console.log('触底了!') + if(!this.isLoading && this.isMore){ + this.isLoading = true + // 翻页 + ShopModel.pageNo++ + this.loadShopInfo() + } + }) + + } + .width('100%') + .height('100%') + .padding(10) + .backgroundColor('#e1e2e3') + } + + loadShopInfo(){ + // 加载数据 + ShopModel.getShopListByAxios() + .then(shops => { + // 给图片加上服务器地址前缀 + shops.forEach(s => { + s.images.forEach((src, i) => { + s.images[i] = 'http://localhost:3000' + src + }) + }) + + this.shops = this.shops.concat(shops) + this.isLoading = false + if(!shops || shops.length === 0){ + this.isMore = false + } + }) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/StatePage.ets b/MyApplication/entry/src/main/ets/pages/StatePage.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdfb4ec74cc76a859e4a1897f19cab8b8dc5d5f8 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/StatePage.ets @@ -0,0 +1,94 @@ +import { Header } from '../common/components/CommonComponents'; + +class Person{ + name: string + age: number + gf: Person + + constructor(name: string, age: number, gf?: Person) { + this.name = name + this.age = age + this.gf = gf + } +} + +@Entry +@Component +struct StatePage2 { + idx: number = 1 + @State p: Person = new Person('Jack', 21, new Person('柔丝', 18)) + @State gfs: Person[] = [ + new Person('柔丝', 18), + new Person('露西', 19), + ] + + build() { + Column({space: 10}) { + Header() + + Text(`${this.p.name} : ${this.p.age}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.p.age++ + }) + Text(`${this.p.gf.name} : ${this.p.gf.age}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.p.gf.age++ + }) + Button('添加') + .onClick(() => { + this.gfs.push(new Person('女友' + this.idx++, 20)) + }) + + Text('=女友列表=') + .fontSize(50) + .fontWeight(FontWeight.Bold) + ForEach( + this.gfs, + (p, index) => { + Row(){ + Text(`${p.name} : ${p.age}`) + .fontSize(30) + .onClick(() => { + this.gfs[index] = new Person(p.name, p.age+1) + }) + Button('删除') + .onClick(() => { + this.gfs.splice(index, 1) + }) + } + .width('100%') + .justifyContent(FlexAlign.SpaceBetween) + } + ) + + } + .width('100%') + .height('100%') + .padding(10) + } +} + + +@Component +struct StatePage { + @State name: string = 'Jack' + @State age: number = 21 + + build() { + Column() { + Text(`${this.name} : ${this.age}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.age++ + }) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/TaskManagePage.ets b/MyApplication/entry/src/main/ets/pages/TaskManagePage.ets new file mode 100644 index 0000000000000000000000000000000000000000..7232db48f557335e6b5a39b42376a3436a699721 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/TaskManagePage.ets @@ -0,0 +1,24 @@ +import { Header } from '../common/components/CommonComponents' +import TaskList from '../views/task/TaskList' +import TaskStatistics from '../views/task/TaskStatistics' + +@Entry +@Component +struct TaskManagePage { + @State totalTask: number = 0 + @State finishTask: number = 0 + + build() { + Column({space: 10}){ + // 1.顶部导航 + Header() + // 2.任务进度卡片 + TaskStatistics({totalTask: this.totalTask, finishTask: this.finishTask}) + // 3.任务列表 + TaskList({totalTask: $totalTask, finishTask: $finishTask}) + } + .width('100%') + .height('100%') + .backgroundColor('#F1F2F3') + } +} diff --git a/MyApplication/entry/src/main/ets/pages/TestPage1.ets b/MyApplication/entry/src/main/ets/pages/TestPage1.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b96e292c562ab75a620ea2a044c8237278f8f51 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/TestPage1.ets @@ -0,0 +1,56 @@ +import router from '@ohos.router' +@Entry +@Component +struct TestPage1 { + @State show: boolean = false + tag: string = 'TestPage1' + + aboutToAppear(){ + console.log(this.tag, 'about to appear') + } + + onPageShow(){ + console.log(this.tag, 'on page show') + } + + onBackPress(){ + console.log(this.tag, 'on back press') + } + + onPageHide(){ + console.log(this.tag, 'on page hide') + } + + aboutToDisappear(){ + console.log(this.tag, 'about to disappear') + } + + build() { + Row() { + Column({space: 20}) { + Text(this.tag) + .fontSize(50) + .fontWeight(FontWeight.Bold) + + Row(){ + Button('push page2') + .onClick(() => { + router.pushUrl({ + url: 'pages/TestPage2' + }) + }) + Button('replace page2') + .onClick(() => { + router.replaceUrl({ + url: 'pages/TestPage2' + }) + }) + } + .width('100%') + .justifyContent(FlexAlign.SpaceAround) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/pages/TestPage2.ets b/MyApplication/entry/src/main/ets/pages/TestPage2.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fce4b27171a25668bf81dfb25e22f0a4918d164 --- /dev/null +++ b/MyApplication/entry/src/main/ets/pages/TestPage2.ets @@ -0,0 +1,55 @@ +import router from '@ohos.router' +@Entry +@Component +struct TestPage2 { + tag: string = 'TestPage2' + + aboutToAppear(){ + console.log(this.tag, 'about to appear') + } + + onPageShow(){ + console.log(this.tag, 'on page show') + } + + onBackPress(){ + console.log(this.tag, 'on back press') + } + + onPageHide(){ + console.log(this.tag, 'on page hide') + } + + aboutToDisappear(){ + console.log(this.tag, 'about to disappear') + } + build() { + Row() { + Column({space: 20}) { + Text(this.tag) + .fontSize(50) + .fontWeight(FontWeight.Bold) + + Row(){ + Button('push page1') + .onClick(() => { + router.pushUrl({ + url: 'pages/TestPage1' + }) + }) + Button('replace page1') + .onClick(() => { + router.replaceUrl({ + url: 'pages/TestPage1' + }) + }) + } + .width('100%') + .justifyContent(FlexAlign.SpaceAround) + } + .width('100%') + + } + .height('100%') + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/viewmodel/RouterInfo.ts b/MyApplication/entry/src/main/ets/viewmodel/RouterInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..85b6dea0d8753dd3683959deed76b6850c6dacea --- /dev/null +++ b/MyApplication/entry/src/main/ets/viewmodel/RouterInfo.ts @@ -0,0 +1,11 @@ +export default class RouterInfo{ + // 页面路径 + url: string + // 页面标题 + title: string + + constructor(url: string, title: string) { + this.url = url; + this.title = title + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/viewmodel/ShopInfo.ts b/MyApplication/entry/src/main/ets/viewmodel/ShopInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..70df26435b76afda252f42fd03c65583156797f7 --- /dev/null +++ b/MyApplication/entry/src/main/ets/viewmodel/ShopInfo.ts @@ -0,0 +1,11 @@ +export default class ShopInfo { + id: number + name: string + images: string[] + area: string + address: string + avgPrice: number + comments: number + score: number + openHours: string +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/viewmodel/TaskInfo.ets b/MyApplication/entry/src/main/ets/viewmodel/TaskInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f251877915a25080271fef357e9b29b06a47b39 --- /dev/null +++ b/MyApplication/entry/src/main/ets/viewmodel/TaskInfo.ets @@ -0,0 +1,15 @@ + +@Observed +export default class TaskInfo{ + id: number + // 任务名称 + name: string + // 任务状态:是否完成 + finished: boolean + + constructor(id: number, name: string) { + this.id = id + this.name = name + this.finished = false + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/views/IndexFontSizePanel.ets b/MyApplication/entry/src/main/ets/views/IndexFontSizePanel.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a69dd8f898de9640dde970dc20578e8a60671ff --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/IndexFontSizePanel.ets @@ -0,0 +1,41 @@ +import PreferencesUtil from '../common/util/PreferencesUtil' + +@Component +export default struct IndexFontSizePanel { + @Consume fontSize: number + fontSizLabel: object = { + 14: '小', + 16: '标准', + 18: '大', + 20: '特大', + } + + build() { + Column() { + Text(this.fontSizLabel[this.fontSize]).fontSize(20) + Row({ space: 5 }) { + Text('A').fontSize(14).fontWeight(FontWeight.Bold) + Slider({ + min: 14, + max: 20, + step: 2, + value: this.fontSize + }) + .showSteps(true) + .trackThickness(6) + .layoutWeight(1) + .onChange(val => { + // 修改字体大小 + this.fontSize = val + // 写入Preferences + PreferencesUtil.putPreferenceValue('MyPreferences', 'IndexFontSize', val) + }) + Text('A').fontSize(20).fontWeight(FontWeight.Bold) + }.width('100%') + } + .width('100%') + .padding(15) + .backgroundColor('#fff1f0f0') + .borderRadius(20) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/views/RouterItem.ets b/MyApplication/entry/src/main/ets/views/RouterItem.ets new file mode 100644 index 0000000000000000000000000000000000000000..a541b4f94865a8f45a67365e8e97d57efc2b227f --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/RouterItem.ets @@ -0,0 +1,42 @@ + +import router from '@ohos.router' +import RouterInfo from '../viewmodel/RouterInfo' + +@Component +export default struct RouterItem{ + r: RouterInfo + i: number + @Consume fontSize: number + + build(){ + Row(){ + Text(this.i + '.') + .fontSize(this.fontSize) + .fontColor(Color.White) + Blank() + Text(this.r.title) + .fontSize(this.fontSize) + .fontColor(Color.White) + } + .width('90%') + .padding(12) + .backgroundColor('#38f') + .borderRadius(20) + .shadow({radius: 6, color: '#4F000000', offsetX: 2, offsetY: 4}) + .onClick(() => { + // router跳转 + router.pushUrl( + { + url: this.r.url, + params: {id: this.i} + }, + router.RouterMode.Single, + err => { + if(err){ + console.log(`路由失败,errCode: ${err.code} errMsg:${err.message}`) + } + } + ) + }) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/views/ShopItem.ets b/MyApplication/entry/src/main/ets/views/ShopItem.ets new file mode 100644 index 0000000000000000000000000000000000000000..692acad938c800364a6f74e7c6f65b393e2def80 --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/ShopItem.ets @@ -0,0 +1,58 @@ +import ShopInfo from '../viewmodel/ShopInfo' + +@Component +export default struct ShopItem { + shop: ShopInfo + + build(){ + Column({space: 5}){ + Row(){ + Text(this.shop.name) + .fontSize(20) + .fontWeight(FontWeight.Bold) + .ellipsisTextOverFlow() + } + .width('100%') + + Row(){ + Text(this.shop.address) + .fontColor('#a3a3a3') + .ellipsisTextOverFlow() + }.width('100%') + + Row({space: 5}){ + Rating({rating: this.shop.score/10 , indicator: true}).stars(5).stepSize(0.1) + Text(`${this.shop.score / 10}`).fontColor('#ffb04d') + Text(`${this.shop.comments}条`).fontColor('#222') + Blank() + Text(`¥${this.shop.avgPrice}/人`) + }.width('100%') + + List({space: 10}){ + ForEach(this.shop.images, (image) => { + ListItem(){ + Column(){ + Image(image) + .width(150).aspectRatio(1.1).borderRadius(5) + } + } + }) + } + .listDirection(Axis.Horizontal) + .width('100%') + } + .width('100%') + .height(240) + .padding(12) + .backgroundColor(Color.White) + .borderRadius(15) + .shadow({radius: 6, color: '#1F000000', offsetX: 2, offsetY: 4}) + } +} + +// 文本超出时的统一样式处理 +@Extend(Text) +function ellipsisTextOverFlow(line: number = 1){ + .textOverflow({overflow: TextOverflow.Ellipsis}) + .maxLines(line) +} diff --git a/MyApplication/entry/src/main/ets/views/notification/DownloadCard.ets b/MyApplication/entry/src/main/ets/views/notification/DownloadCard.ets new file mode 100644 index 0000000000000000000000000000000000000000..665ea2905f7f73bd381da2dac95d5e897b897906 --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/notification/DownloadCard.ets @@ -0,0 +1,200 @@ +import notify from '@ohos.notificationManager' +import wantAgent, { WantAgent } from '@ohos.app.ability.wantAgent' +import promptAction from '@ohos.promptAction' + +enum DownloadState { + NOT_BEGIN = '未开始', + DOWNLOADING = '下载中', + PAUSE = '已暂停', + FINISHED = '已完成', +} + +@Component +export default struct DownloadCard { + // 下载进度 + @State progressValue: number = 0 + progressMaxValue: number = 100 + // 任务状态 + @State state: DownloadState = DownloadState.NOT_BEGIN + + // 下载的文件名 + filename: string = '圣诞星.mp4' + + // 模拟下载的任务的id + taskId: number = -1 + + // 通知id + notificationId: number = 999 + + isSupport: boolean = false + + wantAgentInstance: WantAgent + + async aboutToAppear(){ + // 1.判断当前系统是否支持进度条模板 + this.isSupport = await notify.isSupportTemplate('downloadTemplate') + // 2.创建拉取当前应用的行为意图 + // 2.1.创建wantInfo信息 + let wantInfo: wantAgent.WantAgentInfo = { + wants: [ + { + bundleName: 'com.example.myapplication', + abilityName: 'EntryAbility', + } + ], + requestCode: 0, + operationType: wantAgent.OperationType.START_ABILITY, + wantAgentFlags: [wantAgent.WantAgentFlags.CONSTANT_FLAG] + } + // 2.2.创建wantAgent实例 + this.wantAgentInstance = await wantAgent.getWantAgent(wantInfo) + } + + build() { + Row({ space: 10 }) { + Image($r('app.media.ic_files_video')).width(50) + Column({ space: 5 }) { + Row() { + Text(this.filename) + Text(`${this.progressValue}%`).fontColor('#c1c2c1') + } + .width('100%') + .justifyContent(FlexAlign.SpaceBetween) + + Progress({ + value: this.progressValue, + total: this.progressMaxValue, + }) + + Row({ space: 5 }) { + Text(`${(this.progressValue * 0.43).toFixed(2)}MB`) + .fontSize(14).fontColor('#c1c2c1') + Blank() + if (this.state === DownloadState.NOT_BEGIN) { + Button('开始').downloadButton() + .onClick(() => this.download()) + + } else if (this.state === DownloadState.DOWNLOADING) { + Button('取消').downloadButton().backgroundColor('#d1d2d3') + .onClick(() => this.cancel()) + + Button('暂停').downloadButton() + .onClick(() => this.pause()) + + } else if (this.state === DownloadState.PAUSE) { + Button('取消').downloadButton().backgroundColor('#d1d2d3') + .onClick(() => this.cancel()) + + Button('继续').downloadButton() + .onClick(() => this.download()) + } else { + Button('打开').downloadButton() + .onClick(() => this.open()) + } + }.width('100%') + } + .layoutWeight(1) + } + .width('100%') + .borderRadius(20) + .padding(15) + .backgroundColor(Color.White) + } + + + cancel() { + // 取消定时任务 + if(this.taskId > 0){ + clearInterval(this.taskId); + this.taskId = -1 + } + // 清理下载任务进度 + this.progressValue = 0 + // 标记任务状态:未开始 + this.state = DownloadState.NOT_BEGIN + // 取消通知 + notify.cancel(this.notificationId) + } + + download() { + // 清理旧任务 + if(this.taskId > 0){ + clearInterval(this.taskId); + } + // 开启定时任务,模拟下载 + this.taskId = setInterval(() => { + // 判断任务进度是否达到100 + if(this.progressValue >= 100){ + // 任务完成了,应该取消定时任务 + clearInterval(this.taskId) + this.taskId = -1 + // 并且标记任务状态为已完成 + this.state = DownloadState.FINISHED + // 发送通知 + this.publishDownloadNotification() + return + } + // 模拟任务进度变更 + this.progressValue += 2 + // 发送通知 + this.publishDownloadNotification() + }, 500) + // 标记任务状态:下载中 + this.state = DownloadState.DOWNLOADING + } + + pause() { + // 取消定时任务 + if(this.taskId > 0){ + clearInterval(this.taskId); + this.taskId = -1 + } + // 标记任务状态:已暂停 + this.state = DownloadState.PAUSE + // 发送通知 + this.publishDownloadNotification() + } + + open() { + promptAction.showToast({ + message: '功能未实现' + }) + } + + publishDownloadNotification(){ + // 1.判断当前系统是否支持进度条模板 + if(!this.isSupport){ + // 当前系统不支持进度条模板 + return + } + // 2.准备进度条模板的参数 + let template = { + name: 'downloadTemplate', + data: { + progressValue: this.progressValue, + progressMaxValue: this.progressMaxValue + } + } + let request: notify.NotificationRequest = { + id: this.notificationId, + template: template, + wantAgent: this.wantAgentInstance, + content: { + contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: this.filename + ': ' + this.state, + text: '', + additionalText: this.progressValue + '%' + } + } + } + // 3.发送通知 + notify.publish(request) + .then(() => console.log('test', '通知发送成功')) + .catch(reason => console.log('test', '通知发送失败!', JSON.stringify(reason))) + } +} + +@Extend(Button) function downloadButton() { + .width(75).height(28).fontSize(14) +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/views/task/TaskItem.ets b/MyApplication/entry/src/main/ets/views/task/TaskItem.ets new file mode 100644 index 0000000000000000000000000000000000000000..e78b6e0af2d26fd8e0469f3031b05dafb1f80ba2 --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/task/TaskItem.ets @@ -0,0 +1,49 @@ +import TaskModel from '../../model/TaskModel' +import TaskInfo from '../../viewmodel/TaskInfo' + +@Component +export default struct TaskItem { + @ObjectLink item: TaskInfo + onTaskChange: (item: TaskInfo) => void + + build() { + Row(){ + if(this.item.finished){ + Text(this.item.name) + .finishedTask() + }else{ + Text(this.item.name) + } + Checkbox() + .select(this.item.finished) + .onChange(async val => { + // 1.更新当前任务状态 + TaskModel.updateTaskStatus(this.item.id, val) + .then(() => { + this.item.finished = val + // 2.更新已完成任务数量 + this.onTaskChange(this.item) + }) + .catch(error => console.log('testTag', '更新任务状态失败, id = ', this.item.id, JSON.stringify(error))) + + }) + } + .card() + .justifyContent(FlexAlign.SpaceBetween) + } +} + +// 任务完成样式 +@Extend(Text) function finishedTask(){ + .decoration({type:TextDecorationType.LineThrough}) + .fontColor('#B1B2B1') +} + +// 统一的卡片样式 +@Styles function card(){ + .width('95%') + .padding(20) + .backgroundColor(Color.White) + .borderRadius(15) + .shadow({radius: 6, color: '#1F000000', offsetX: 2, offsetY: 4}) +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/views/task/TaskList.ets b/MyApplication/entry/src/main/ets/views/task/TaskList.ets new file mode 100644 index 0000000000000000000000000000000000000000..11cd7202b0e2a5f32fe5c25c884bfd1fa227abe0 --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/task/TaskList.ets @@ -0,0 +1,135 @@ +import TaskInfo from '../../viewmodel/TaskInfo' +import TaskItem from './TaskItem' +import TaskModel from '../../model/TaskModel' + +@Component +export default struct TaskList { + // 总任务数量 + @Link totalTask: number + @Link finishTask: number + // 任务数组 + @State tasks: TaskInfo[] = [] + + idx: number = 1 + // 任务信息弹窗 + dialogController: CustomDialogController = new CustomDialogController({ + builder: TaskInfoDialog({onTaskConfirm: this.handleAddTask.bind(this)}), + }) + + aboutToAppear(){ + // 查询任务列表 + console.log('testTag', '初始化组件,查询任务列表') + TaskModel.getTaskList() + .then(tasks => { + this.tasks = tasks + // 更新任务状态 + this.handleTaskChange() + }) + } + + handleTaskChange(){ + // 1.更新任务总数量 + this.totalTask = this.tasks.length + // 2.更新已完成任务数量 + this.finishTask = this.tasks.filter(item => item.finished).length + } + + handleAddTask(name: string){ + // 1.新增任务 + TaskModel.addTask(name) + .then(id => { + console.log('testTag', '处理新增任务: ', name) + // 回显到数组页面 + this.tasks.push(new TaskInfo(id, name)) + // 2.更新任务完成状态 + this.handleTaskChange() + // 3.关闭对话框 + this.dialogController.close() + }) + .catch(error => console.log('testTag', '新增任务失败:', name, JSON.stringify(error))) + + } + + build() { + Column(){ + // 1.新增任务按钮 + Button('新增任务') + .width(200) + .margin({bottom: 10}) + .onClick(() => { + // 打开新增表单对话框 + this.dialogController.open() + }) + + // 2.任务列表 + List({space: 10}){ + ForEach( + this.tasks, + (item: TaskInfo, index) => { + ListItem(){ + TaskItem({item: item, onTaskChange: this.handleTaskChange.bind(this)}) + } + .swipeAction({end: this.DeleteButton(index, item.id)}) + } + ) + } + .width('100%') + .layoutWeight(1) + .alignListItem(ListItemAlign.Center) + } + } + + @Builder DeleteButton(index: number, id: number){ + Button(){ + Image($r('app.media.ic_public_delete_filled')) + .fillColor(Color.White) + .width(20) + } + .width(40) + .height(40) + .type(ButtonType.Circle) + .backgroundColor(Color.Red) + .margin(5) + .onClick(() => { + // 删除任务 + TaskModel.deleteTaskById(id) + .then(() => { + this.tasks.splice(index, 1) + console.log('testTag', `尝试删除任务,index: ${index}`) + this.handleTaskChange() + }) + .catch(error => console.log('testTag', '删除任务失败,id = ', id, JSON.stringify(error))) + + }) + } +} + +@CustomDialog +struct TaskInfoDialog{ + + name: string = '' + onTaskConfirm : (name: string) => void + controller: CustomDialogController + + build(){ + Column({space: 20}){ + TextInput({placeholder: '输入任务名'}) + .onChange(val => this.name = val) + Row(){ + Button('确定') + .onClick(() => { + this.onTaskConfirm(this.name) + }) + Button('取消') + .backgroundColor(Color.Grey) + .onClick(() => { + this.controller.close() + }) + } + .width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + } + .width('100%') + .padding(20) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/ets/views/task/TaskStatistics.ets b/MyApplication/entry/src/main/ets/views/task/TaskStatistics.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7f4cf672861301f687ebd76e6ca2bbb0915b604 --- /dev/null +++ b/MyApplication/entry/src/main/ets/views/task/TaskStatistics.ets @@ -0,0 +1,40 @@ +// 统一的卡片样式 +@Styles function card(){ + .width('95%') + .padding(20) + .backgroundColor(Color.White) + .borderRadius(15) + .shadow({radius: 6, color: '#1F000000', offsetX: 2, offsetY: 4}) +} + +@Component +export default struct TaskStatistics { + @Prop totalTask: number + @Prop finishTask: number + + build() { + Row(){ + Text('任务进度:') + .fontSize(30) + .fontWeight(FontWeight.Bold) + Stack(){ + Progress({ + value: this.finishTask, + total: this.totalTask, + type: ProgressType.Ring + }) + .width(100) + Row(){ + Text(this.finishTask.toString()) + .fontSize(24) + .fontColor('#36D') + Text(' / ' + this.totalTask.toString()) + .fontSize(24) + } + } + } + .card() + .margin({top: 5, bottom: 10}) + .justifyContent(FlexAlign.SpaceEvenly) + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/module.json5 b/MyApplication/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e70dd78093575cbf91fe38949eaf155fc9ec4ab3 --- /dev/null +++ b/MyApplication/entry/src/main/module.json5 @@ -0,0 +1,53 @@ +{ + "module": { + "requestPermissions": [ + { + "name": "ohos.permission.INTERNET" + } + ], + "name": "entry", + "type": "entry", + "srcEntry": './ets/myabilitystage/MyAbilityStage.ts', + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "phone", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:ic_main", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + }, + { + "name": "DocumentAbility", + "srcEntry": "./ets/documentability/DocumentAbility.ts", + "description": "$string:DocumentAbility_desc", + "icon": "$media:icon", + "label": "$string:DocumentAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "launchType": "specified" + } + ] + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/element/color.json b/MyApplication/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/element/string.json b/MyApplication/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..417bdb347dba1ed75fca46e01cd40fc0be329d39 --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/element/string.json @@ -0,0 +1,28 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "width_label", + "value": "Image Width: " + }, + { + "name": "DocumentAbility_desc", + "value": "description" + }, + { + "name": "DocumentAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/fish.png b/MyApplication/entry/src/main/resources/base/media/fish.png new file mode 100644 index 0000000000000000000000000000000000000000..3969e16ca0186bc14fc2105f05c952437c879355 Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/fish.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/fish_rev.png b/MyApplication/entry/src/main/resources/base/media/fish_rev.png new file mode 100644 index 0000000000000000000000000000000000000000..863a8f4d6372266516b2b19f245de87eb505dba3 Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/fish_rev.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/freeBudsPro3.png b/MyApplication/entry/src/main/resources/base/media/freeBudsPro3.png new file mode 100644 index 0000000000000000000000000000000000000000..ea0ad7a1d7e8bf55d074ca7efb4f6f168bf37f7c Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/freeBudsPro3.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/ic_files_doc.svg b/MyApplication/entry/src/main/resources/base/media/ic_files_doc.svg new file mode 100644 index 0000000000000000000000000000000000000000..9ed6f4dd2f589a24604a5319e96b20f7e8710d6e --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_files_doc.svg @@ -0,0 +1,10 @@ + + + ic_normal_white_grid_doc + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_files_video.svg b/MyApplication/entry/src/main/resources/base/media/ic_files_video.svg new file mode 100644 index 0000000000000000000000000000000000000000..c9514cb9da39331a2c0d0648752025685eea2bbf --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_files_video.svg @@ -0,0 +1,9 @@ + + + ic_normal_white_grid_vedio + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_main.png b/MyApplication/entry/src/main/resources/base/media/ic_main.png new file mode 100644 index 0000000000000000000000000000000000000000..aae47b0164db8051d68dfc5f342c8331f698a0db Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/ic_main.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_add.svg b/MyApplication/entry/src/main/resources/base/media/ic_public_add.svg new file mode 100644 index 0000000000000000000000000000000000000000..993f5af0052fb66d781b07d402e26a4682d7b406 --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_public_add.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_add + + + + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_back.png b/MyApplication/entry/src/main/resources/base/media/ic_public_back.png new file mode 100644 index 0000000000000000000000000000000000000000..6e2fb8707d24810c8f008f77c8aacc262fb441ca Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/ic_public_back.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_delete.svg b/MyApplication/entry/src/main/resources/base/media/ic_public_delete.svg new file mode 100644 index 0000000000000000000000000000000000000000..0091cd5d820049a647270d5a4118ab0e747f467a --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_public_delete.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_delete + + + + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_delete_filled.svg b/MyApplication/entry/src/main/resources/base/media/ic_public_delete_filled.svg new file mode 100644 index 0000000000000000000000000000000000000000..844ba381c355a0df4475c78692cd6b392f2131c0 --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_public_delete_filled.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_delete_filled + + + + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_highlights.svg b/MyApplication/entry/src/main/resources/base/media/ic_public_highlights.svg new file mode 100644 index 0000000000000000000000000000000000000000..7f0c77423290d138e1c06b9de163af52d0ba0195 --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_public_highlights.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_collect + + + + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_refresh.png b/MyApplication/entry/src/main/resources/base/media/ic_public_refresh.png new file mode 100644 index 0000000000000000000000000000000000000000..be1f7dc31d13a592fab3ca3e7ac46b0244e97939 Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/ic_public_refresh.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_search.svg b/MyApplication/entry/src/main/resources/base/media/ic_public_search.svg new file mode 100644 index 0000000000000000000000000000000000000000..19f696581e659e49e686c842426f07fe6bebf307 --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_public_search.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_search + + + + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/ic_public_settings.svg b/MyApplication/entry/src/main/resources/base/media/ic_public_settings.svg new file mode 100644 index 0000000000000000000000000000000000000000..5dca06f2e4069a2f528012712d654574c90e6d8e --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/media/ic_public_settings.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_settings + + + + + + + + + + \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/base/media/icon.png b/MyApplication/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/icon.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/mate60.png b/MyApplication/entry/src/main/resources/base/media/mate60.png new file mode 100644 index 0000000000000000000000000000000000000000..c53be5f45fdecbf82fbe9d9d976fec2c941a8814 Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/mate60.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/mateBookProX.png b/MyApplication/entry/src/main/resources/base/media/mateBookProX.png new file mode 100644 index 0000000000000000000000000000000000000000..d878ab22156c5aa17e980beccbe717c325d41ffe Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/mateBookProX.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/mateX5.png b/MyApplication/entry/src/main/resources/base/media/mateX5.png new file mode 100644 index 0000000000000000000000000000000000000000..f03640c2ef1835bf03870a40b82d90cacaa05119 Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/mateX5.png differ diff --git a/MyApplication/entry/src/main/resources/base/media/sea.jpg b/MyApplication/entry/src/main/resources/base/media/sea.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c89df647af9d3a0b42866aac2ca40947c27890eb Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/sea.jpg differ diff --git a/MyApplication/entry/src/main/resources/base/media/watchGT4.png b/MyApplication/entry/src/main/resources/base/media/watchGT4.png new file mode 100644 index 0000000000000000000000000000000000000000..7b37aa93634157c85b52cae3411704ae5dcc89b2 Binary files /dev/null and b/MyApplication/entry/src/main/resources/base/media/watchGT4.png differ diff --git a/MyApplication/entry/src/main/resources/base/profile/main_pages.json b/MyApplication/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..df424611dbaec23af8a730f94e78d36ea67e967e --- /dev/null +++ b/MyApplication/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,19 @@ +{ + "src": [ + "pages/Index", + "pages/ImagePage", + "pages/ItemPage", + "pages/StatePage", + "pages/PropPage", + "pages/LifeCirclePage", + "pages/TestPage1", + "pages/TestPage2", + "pages/AnimationPage", + "pages/AnimationPage2", + "pages/DocumentListPage", + "pages/DocumentPage", + "pages/ShopPage", + "pages/TaskManagePage", + "pages/NotificationPage" + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/en_US/element/string.json b/MyApplication/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..417bdb347dba1ed75fca46e01cd40fc0be329d39 --- /dev/null +++ b/MyApplication/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,28 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "width_label", + "value": "Image Width: " + }, + { + "name": "DocumentAbility_desc", + "value": "description" + }, + { + "name": "DocumentAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/main/resources/zh_CN/element/string.json b/MyApplication/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..fa79a1968f6f2ca7d03c30a3d8841a8d74cb8753 --- /dev/null +++ b/MyApplication/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,28 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "黑马应用" + }, + { + "name": "width_label", + "value": "图片宽度: " + }, + { + "name": "DocumentAbility_desc", + "value": "description" + }, + { + "name": "DocumentAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/ets/test/Ability.test.ets b/MyApplication/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8abf7f2f44c0e56110df8c09b2524a4ca37bc993 --- /dev/null +++ b/MyApplication/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,35 @@ +import hilog from '@ohos.hilog'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' + +export default function abilityTest() { + describe('ActsAbilityTest', function () { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(function () { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(function () { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(function () { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(function () { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain',0, function () { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc' + let b = 'b' + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b) + expect(a).assertEqual(a) + }) + }) +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/ets/test/List.test.ets b/MyApplication/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d766fe249dfc3ada636f27e64d9b64451ce32c93 --- /dev/null +++ b/MyApplication/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,5 @@ +import abilityTest from './Ability.test' + +export default function testsuite() { + abilityTest() +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/ets/testability/TestAbility.ets b/MyApplication/entry/src/ohosTest/ets/testability/TestAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..e3f6e911d3fffba1e1795c60ed1ee4db15b386fd --- /dev/null +++ b/MyApplication/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -0,0 +1,48 @@ +import UIAbility from '@ohos.app.ability.UIAbility'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; +import hilog from '@ohos.hilog'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../test/List.test'; +import window from '@ohos.window'; + +export default class TestAbility extends UIAbility { + onCreate(want, launchParam) { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); + var abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + onDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage) { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); + windowStage.loadContent('testability/pages/Index', (err, data) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', + JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); + } + + onForeground() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); + } + + onBackground() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/ets/testability/pages/Index.ets b/MyApplication/entry/src/ohosTest/ets/testability/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..166366593a7e55ef17e6619f68a4c46214814858 --- /dev/null +++ b/MyApplication/entry/src/ohosTest/ets/testability/pages/Index.ets @@ -0,0 +1,34 @@ +import hilog from '@ohos.hilog'; + +@Entry +@Component +struct Index { + aboutToAppear() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); + } + @State message: string = 'Hello World' + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('35%') + .height('5%') + .onClick(()=>{ + }) + } + .width('100%') + } + .height('100%') + } + } \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/MyApplication/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts new file mode 100644 index 0000000000000000000000000000000000000000..92a16d84e8870da219c51d9f1342c79203c1f42d --- /dev/null +++ b/MyApplication/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,49 @@ +import hilog from '@ohos.hilog'; +import TestRunner from '@ohos.application.testRunner'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +async function onAbilityCreateCallback() { + hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); +} + +async function addAbilityMonitorCallback(err: any) { + hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare '); + } + + async onRun() { + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' + let lMonitor = { + abilityName: testAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName + var debug = abilityDelegatorArguments.parameters['-D'] + if (debug == 'true') + { + cmd += ' -D' + } + hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); + }) + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/module.json5 b/MyApplication/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c031340ae7fd7b40daa3147b42b24c23f4119481 --- /dev/null +++ b/MyApplication/entry/src/ohosTest/module.json5 @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry_test", + "type": "feature", + "description": "$string:module_test_desc", + "mainElement": "TestAbility", + "deviceTypes": [ + "phone", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:test_pages", + "abilities": [ + { + "name": "TestAbility", + "srcEntry": "./ets/testability/TestAbility.ets", + "description": "$string:TestAbility_desc", + "icon": "$media:icon", + "label": "$string:TestAbility_label", + "exported": true, + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ] + } + ] + } +} diff --git a/MyApplication/entry/src/ohosTest/resources/base/element/color.json b/MyApplication/entry/src/ohosTest/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/MyApplication/entry/src/ohosTest/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/resources/base/element/string.json b/MyApplication/entry/src/ohosTest/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..65d8fa5a7cf54aa3943dcd0214f58d1771bc1f6c --- /dev/null +++ b/MyApplication/entry/src/ohosTest/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_test_desc", + "value": "test ability description" + }, + { + "name": "TestAbility_desc", + "value": "the test ability" + }, + { + "name": "TestAbility_label", + "value": "test label" + } + ] +} \ No newline at end of file diff --git a/MyApplication/entry/src/ohosTest/resources/base/media/icon.png b/MyApplication/entry/src/ohosTest/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/MyApplication/entry/src/ohosTest/resources/base/media/icon.png differ diff --git a/MyApplication/entry/src/ohosTest/resources/base/profile/test_pages.json b/MyApplication/entry/src/ohosTest/resources/base/profile/test_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..b7e7343cacb32ce982a45e76daad86e435e054fe --- /dev/null +++ b/MyApplication/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "testability/pages/Index" + ] +} diff --git a/MyApplication/hvigor/hvigor-config.json5 b/MyApplication/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..925d91375818953dfab6c055575f484b10a4bb0d --- /dev/null +++ b/MyApplication/hvigor/hvigor-config.json5 @@ -0,0 +1,5 @@ +{ + "modelVersion": "5.0.2", + "dependencies": { + } +} \ No newline at end of file diff --git a/MyApplication/hvigorfile.ts b/MyApplication/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3 --- /dev/null +++ b/MyApplication/hvigorfile.ts @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +export { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/MyApplication/oh-package-lock.json5 b/MyApplication/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..728b43f06995eaef480573b5ab85a2dcf14321a9 --- /dev/null +++ b/MyApplication/oh-package-lock.json5 @@ -0,0 +1,28 @@ +{ + "meta": { + "stableOrder": true + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/axios@^2.2.5": "@ohos/axios@2.2.5", + "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" + }, + "packages": { + "@ohos/axios@2.2.5": { + "name": "@ohos/axios", + "version": "2.2.5", + "integrity": "sha512-fTqwg2qzlPHiEwpHz+V3ArP7Of76FX7q1RHBwD5ENy9eBopK4PPJgRrVwb4V8AgZrWzkjcLFS/R/eXjk6/cd9A==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.5.har", + "registryType": "ohpm" + }, + "@ohos/hypium@1.0.6": { + "name": "@ohos/hypium", + "version": "1.0.6", + "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", + "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/MyApplication/oh-package.json5 b/MyApplication/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..f7799e341d45411c39f43dedd5f128e0a1911524 --- /dev/null +++ b/MyApplication/oh-package.json5 @@ -0,0 +1,16 @@ +{ + "modelVersion": "5.0.2", + "name": "myapplication", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": { + "@ohos/axios": "^2.2.5" + }, + "devDependencies": { + "@ohos/hypium": "1.0.6" + }, + "dynamicDependencies": {} +} \ No newline at end of file diff --git a/MyApplication/shopServer/app.js b/MyApplication/shopServer/app.js new file mode 100644 index 0000000000000000000000000000000000000000..b23cb765241e0cee94475b4bbcbe63d088656c1a --- /dev/null +++ b/MyApplication/shopServer/app.js @@ -0,0 +1,40 @@ +var createError = require('http-errors'); +var express = require('express'); +var path = require('path'); +var cookieParser = require('cookie-parser'); +var logger = require('morgan'); + +var indexRouter = require('./routes/index'); +var usersRouter = require('./routes/users'); + +var app = express(); + +// view engine setup +app.set('views', path.join(__dirname, 'views')); +app.set('view engine', 'jade'); + +app.use(logger('dev')); +app.use(express.json()); +app.use(express.urlencoded({ extended: false })); +app.use(cookieParser()); +app.use(express.static(path.join(__dirname, 'public'))); +app.use('/', indexRouter); +app.use('/shops', usersRouter); + +// catch 404 and forward to error handler +app.use(function(req, res, next) { + next(createError(404)); +}); + +// error handler +app.use(function(err, req, res, next) { + // set locals, only providing error in development + res.locals.message = err.message; + res.locals.error = req.app.get('env') === 'development' ? err : {}; + + // render the error page + res.status(err.status || 500); + res.render('error'); +}); + +module.exports = app; diff --git a/MyApplication/shopServer/bin/www b/MyApplication/shopServer/bin/www new file mode 100644 index 0000000000000000000000000000000000000000..e1dc11191953417a0fb77779de203c2d00d82ebe --- /dev/null +++ b/MyApplication/shopServer/bin/www @@ -0,0 +1,90 @@ +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var app = require('../app'); +var debug = require('debug')('shopserver:server'); +var http = require('http'); + +/** + * Get port from environment and store in Express. + */ + +var port = normalizePort(process.env.PORT || '3000'); +app.set('port', port); + +/** + * Create HTTP server. + */ + +var server = http.createServer(app); + +/** + * Listen on provided port, on all network interfaces. + */ + +server.listen(port); +server.on('error', onError); +server.on('listening', onListening); + +/** + * Normalize a port into a number, string, or false. + */ + +function normalizePort(val) { + var port = parseInt(val, 10); + + if (isNaN(port)) { + // named pipe + return val; + } + + if (port >= 0) { + // port number + return port; + } + + return false; +} + +/** + * Event listener for HTTP server "error" event. + */ + +function onError(error) { + if (error.syscall !== 'listen') { + throw error; + } + + var bind = typeof port === 'string' + ? 'Pipe ' + port + : 'Port ' + port; + + // handle specific listen errors with friendly messages + switch (error.code) { + case 'EACCES': + console.error(bind + ' requires elevated privileges'); + process.exit(1); + break; + case 'EADDRINUSE': + console.error(bind + ' is already in use'); + process.exit(1); + break; + default: + throw error; + } +} + +/** + * Event listener for HTTP server "listening" event. + */ + +function onListening() { + var addr = server.address(); + var bind = typeof addr === 'string' + ? 'pipe ' + addr + : 'port ' + addr.port; + debug('Listening on ' + bind); +} diff --git a/MyApplication/shopServer/controllers/shopController b/MyApplication/shopServer/controllers/shopController new file mode 100644 index 0000000000000000000000000000000000000000..16bf588a921ec877c27b586942a3ea44c5920dc5 --- /dev/null +++ b/MyApplication/shopServer/controllers/shopController @@ -0,0 +1,10 @@ +const shopData = require('../models/shopData') + +exports.get_shop_list = (req, res) => { + let pageNo = req.query.pageNo || 1 + let pageSize = req.query.pageSize || 3 + + let from = (pageNo - 1) * pageSize + let end = pageNo * pageSize + res.send(shopData.data.slice(from, end)) +} \ No newline at end of file diff --git a/MyApplication/shopServer/models/shopData.js b/MyApplication/shopServer/models/shopData.js new file mode 100644 index 0000000000000000000000000000000000000000..1e22dda8e3969aa60f3b1950e8ac839afa92ccba --- /dev/null +++ b/MyApplication/shopServer/models/shopData.js @@ -0,0 +1,209 @@ +exports.data = [ + { + id: 1, + name: "103茶餐厅", + images: [ + "/images/s3fqawWswzk.jpg", + "/images/aZGOT1OjpJmLxG6urQ.jpg", + ], + area: "大关", + address: "金华路锦昌文华苑29号", + avgPrice: 80, + comments: 3035, + score: 37, + openHours: "10:00-22:00" + }, + { + id: 2, + name: "蔡馬洪涛烤肉·老北京铜锅涮羊肉", + images: [ + "/images/faca41195272.jpg", + "/images/a9f88d706914.jpg", + "/images/jpJmLxG6urQ.jpg", + ], + area: "拱宸桥/上塘", + address: "上塘路1035号(中国工商银行旁)", + avgPrice: 85, + comments: 1460, + score: 46, + openHours: "11:30-03:00" + }, + { + id: 3, + name: "新白鹿餐厅(运河上街店)", + images: [ + "/images/7cgjmzif2w2aalka4gms.jpg", + "/images/73w0k4d40mxjt54btzda.jpg", + "/images/uyb31c7yfqy95dejvis1.jpg" + ], + area: "运河上街", + address: "台州路2号运河上街购物中心F5", + avgPrice: 61, + comments: 8045, + score: 47, + openHours: "10:30-21:00" + }, + { + id: 4, + name: "Mamala(杭州远洋乐堤港店)", + images: [ + "/images/xpm2bq95a3ro2lc4vp5u.jpg", + "/images/7kd3rq9hvtougx3mhnlt.jpg" + ], + area: "拱宸桥/上塘", + address: "丽水路66号远洋乐堤港商城2期1层B115号", + avgPrice: 290, + comments: 9529, + score: 49, + openHours: "11:00-22:00" + }, + { + id: 5, + name: "海底捞火锅(水晶城购物中心店)", + images: [ + "/images/cop9mdceu84u8tc2jbn3.jpg", + "/images/a32tu0fcsx2uqzmz1q4x.jpg", + "/images/51kc8vrtuv3aptsyiz8e.jpg" + ], + area: "大关", + address: "上塘路458号水晶城购物中心F6", + avgPrice: 104, + comments: 2764, + score: 49, + openHours: "10:00-07:00" + }, + { + id: 6, + name: "幸福里老北京涮锅(丝联店)", + images: [ + "/images/0umqz2f31dzt3xgtgace.jpg", + "/images/jqyyz124gkpjmjf6acbq.jpg", + "/images/3zum75sjhcjzg3xovxfn.jpg" + ], + area: "拱宸桥/上塘", + address: "金华南路189号丝联166号", + avgPrice: 130, + comments: 7324, + score: 46, + openHours: "11:00-13:50,17:00-20:50" + }, + { + id: 7, + name: "炉鱼(拱墅万达广场店)", + images: [ + "/images/fiwr4q2oqafplj878m29.jpg", + "/images/qp8zytma8e5wxihsopl5.jpg", + "/images/1rb12wuorplppolc9kik.jpg" + ], + area: "北部新城", + address: "杭行路666号万达商业中心4幢2单元409室(铺位号4005)", + avgPrice: 85, + comments: 1320, + score: 47, + openHours: "00:00-24:00" + }, + { + id: 8, + name: "浅草屋寿司(运河上街店)", + images: [ + "/images/uyzq1pp02s5p8er72xjp.jpg", + "/images/tengoka3szcne2l5qdce.jpg", + "/images/yg298agms1yh4mlcqw90.jpg" + ], + area: "运河上街", + address: "拱墅区金华路80号运河上街B1", + avgPrice: 88, + comments: 1206, + score: 46, + openHours: " 11:00-21:30" + }, + { + id: 9, + name: "羊老三羊蝎子牛仔排北派炭火锅(运河上街店)", + images: [ + "/images/f4v3zb731xbt4r99ku7m.jpg", + "/images/xivydckcuy55d340u0ry.jpg", + "/images/vci5gob5ppqfyhru96zf.jpg" + ], + area: "运河上街", + address: "台州路2号运河上街购物中心F5", + avgPrice: 101, + comments: 1363, + score: 44, + openHours: "11:00-21:30" + }, + { + id: 10, + name: "开乐迪KTV(运河上街店)", + images: [ + "/images/7wlj8wggqtju56kmmw7a.jpg", + "/images/1ar1gi8lbimiyze7rw4h.jpg", + "/images/5mz2q5vci3skk15cyvzm.jpg" + ], + area: "运河上街", + address: "台州路2号运河上街购物中心F4", + avgPrice: 67, + comments: 902, + score: 37, + openHours: "00:00-24:00" + }, + { + id: 11, + name: "INLOVE KTV(水晶城店)", + images: [ + "/images/vkulf1otmdjyqy2qdg1l.jpg", + "/images/bk4tsfyi2unckw5wzl91.jpg", + "/images/1gx3g751tym63606bfw7.jpg" + ], + area: "水晶城", + address: "上塘路458号水晶城购物中心6层", + avgPrice: 75, + comments: 5684, + score: 47, + openHours: "11:30-06:00" + }, + { + id: 12, + name: "魅(杭州远洋乐堤港店)", + images: [ + "/images/jryhgc4r8vobyrl12dh2.jpg", + "/images/qea0skai3ki5ukn9117z.jpg" + ], + area: "远洋乐堤港", + address: "丽水路58号远洋乐堤港F4", + avgPrice: 88, + comments: 235, + score: 46, + openHours: "10:00-02:00" + }, + { + id: 13, + name: "讴K拉量贩KTV(北城天地店)", + images: [ + "/images/dz4wtw1gpsmlawpjhnqu.jpg", + "/images/d3dn9hhryjvfvbracvrf.jpg", + "/images/edszk4cuy84855tycdj0.jpg" + ], + area: "D32天阳购物中心", + address: "湖州街567号北城天地5层", + avgPrice: 58, + comments: 1857, + score: 41, + openHours: "12:00-02:00" + }, + { + id: 14, + name: "星聚会KTV(拱墅区万达店)", + images: [ + "/images/aho99xnzeej4xm66cpek.jpg", + "/images/3hplshr168gc8i1c0lq2.jpg", + "/images/8bnshomf8zgw2havnl47.jpg" + ], + area: "北部新城", + address: "杭行路666号万达广场C座1-2F", + avgPrice: 60, + comments: 685, + score: 47, + openHours: "10:00-22:00" + } +] \ No newline at end of file diff --git a/MyApplication/shopServer/package-lock.json b/MyApplication/shopServer/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..48f624344cf3079a456e2738ca152e3f301d3888 --- /dev/null +++ b/MyApplication/shopServer/package-lock.json @@ -0,0 +1,1772 @@ +{ + "name": "shopserver", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "shopserver", + "version": "0.0.0", + "dependencies": { + "cookie-parser": "~1.4.4", + "debug": "~2.6.9", + "express": "~4.16.1", + "http-errors": "~1.6.3", + "jade": "~1.11.0", + "morgan": "~1.9.1" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "2.7.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha512-pXK8ez/pVjqFdAgBkF1YPVRacuLQ9EXBKaKWaeh58WNfMkCmZhOZzu+NtKSPD5PHmCCHheQ5cD29qM1K4QTxIg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "1.0.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/acorn-globals/-/acorn-globals-1.0.9.tgz", + "integrity": "sha512-j3/4pkfih8W4NK22gxVSXcEonTpAHOHh0hu5BoZrKcOsW/4oBPxTi4Yk3SAj+FhC1f3+bRTkXdm4019gw1vg9g==", + "license": "MIT", + "dependencies": { + "acorn": "^2.1.0" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "license": "BSD-3-Clause OR MIT", + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asap": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/asap/-/asap-1.0.0.tgz", + "integrity": "sha512-Ej9qjcXY+8Tuy1cNqiwNMwFRXOy9UwgTeMA8LxreodygIPV48lx8PU1ecFxb5ZeU1DpMKxiq6vGLTxcitWZPbA==" + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser": { + "version": "1.18.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha512-YQyoqQG3sO8iCmf8+hyVpgHHOv0/hCEFiS4zTGUwTA1HjAFX66wRcNQrVCeJq9pgESMRvUAOvSil5MJlmccuKQ==", + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "license": "MIT", + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/character-parser": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/character-parser/-/character-parser-1.2.1.tgz", + "integrity": "sha512-6OEBVBlf/y8LaAphnbAnt743O3zMhlBer+FO5D40H6wqAdU9B1TvuApkejgLW0cvv0tEZNLktv1AnRI+C87ueQ==", + "license": "MIT" + }, + "node_modules/clean-css": { + "version": "3.4.28", + "resolved": "https://repo.huaweicloud.com/repository/npm/clean-css/-/clean-css-3.4.28.tgz", + "integrity": "sha512-aTWyttSdI2mYi07kWqHi24NUU9YlELFKGOAgFzZjDN1064DMAOy2FBuoyGmkKRlXkbpXd0EVHmiVkbKhKoirTw==", + "license": "MIT", + "dependencies": { + "commander": "2.8.x", + "source-map": "0.4.x" + }, + "bin": { + "cleancss": "bin/cleancss" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/clean-css/node_modules/commander": { + "version": "2.8.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/commander/-/commander-2.8.1.tgz", + "integrity": "sha512-+pJLBFVk+9ZZdlAOB5WuIElVPPth47hILFkmGym57aq8kwxsowvByvB0DHs1vQAhyMZzdcpTtF0VDKGkSDR4ZQ==", + "license": "MIT", + "dependencies": { + "graceful-readlink": ">= 1.0.0" + }, + "engines": { + "node": ">= 0.6.x" + } + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "license": "ISC", + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/commander": { + "version": "2.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/commander/-/commander-2.6.0.tgz", + "integrity": "sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg==", + "license": "MIT", + "engines": { + "node": ">= 0.6.x" + } + }, + "node_modules/constantinople": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/constantinople/-/constantinople-3.0.2.tgz", + "integrity": "sha512-UnEggAQrmhxuTxlb7n1OsTtagNXWUv2CRlOogZhWOU4jLK4EJEbF8UDSNxuGu+jVtWNtO2j51ab2H1wlBIzF/w==", + "deprecated": "Please update to at least constantinople 3.1.1", + "license": "MIT", + "dependencies": { + "acorn": "^2.1.0" + } + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-parser": { + "version": "1.4.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie-parser/-/cookie-parser-1.4.6.tgz", + "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", + "license": "MIT", + "dependencies": { + "cookie": "0.4.1", + "cookie-signature": "1.0.6" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/css": { + "version": "1.0.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/css/-/css-1.0.8.tgz", + "integrity": "sha512-qmTYWhHk910nQWnGqMAiWWPQlB6tESiWgNebQJmiozOAGcBAQ1+U/UzUOkhdrcshlkSRRiKWodwmVvO0OmnIGg==", + "dependencies": { + "css-parse": "1.0.4", + "css-stringify": "1.0.5" + } + }, + "node_modules/css-parse": { + "version": "1.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/css-parse/-/css-parse-1.0.4.tgz", + "integrity": "sha512-pfstzKVRZiHprDXdsmtfH1HYUEw22lzjuHdnpe1hscwoQvgW2C5zDQIBE0RKoALEReTn9W1ECdY8uaT/kO4VfA==" + }, + "node_modules/css-stringify": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/css-stringify/-/css-stringify-1.0.5.tgz", + "integrity": "sha512-aIThpcErhG5EyHorGqNlTh0TduNBqLrrXLO3x5rku3ZKBxuVfY+T7noyM2G2X/01iQANqJUb6d3+FLoa+N7Xwg==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==", + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.16.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/finalhandler": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/graceful-readlink": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==", + "license": "MIT" + }, + "node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.23", + "resolved": "https://repo.huaweicloud.com/repository/npm/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "license": "MIT" + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "license": "MIT" + }, + "node_modules/jade": { + "version": "1.11.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jade/-/jade-1.11.0.tgz", + "integrity": "sha512-J76sbGKeLtu7uwW97Ntzb1UvGnpKTDplYa9ROr2gNRhM+SxvlBSG0Ees3TQ8+7ya2UVkzMEeFxhRhEpN68s7Tg==", + "deprecated": "Jade has been renamed to pug, please install the latest version of pug instead of jade", + "license": "MIT", + "dependencies": { + "character-parser": "1.2.1", + "clean-css": "^3.1.9", + "commander": "~2.6.0", + "constantinople": "~3.0.1", + "jstransformer": "0.0.2", + "mkdirp": "~0.5.0", + "transformers": "2.1.0", + "uglify-js": "^2.4.19", + "void-elements": "~2.0.1", + "with": "~4.0.0" + }, + "bin": { + "jade": "bin/jade.js" + } + }, + "node_modules/jstransformer": { + "version": "0.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/jstransformer/-/jstransformer-0.0.2.tgz", + "integrity": "sha512-b7tmf91j1ChMuYhwbPBnNgB62dmHuqiHpOdd6QLKzde8HydZqm+ud3qWreGWecSxPBFFNOf1Ozjx0xo2plFdHA==", + "license": "MIT", + "dependencies": { + "is-promise": "^2.0.0", + "promise": "^6.0.1" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "license": "MIT", + "bin": { + "mime": "cli.js" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://repo.huaweicloud.com/repository/npm/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/morgan": { + "version": "1.9.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/optimist": { + "version": "0.3.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + "license": "MIT/X11", + "dependencies": { + "wordwrap": "~0.0.2" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "license": "MIT" + }, + "node_modules/promise": { + "version": "6.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/promise/-/promise-6.1.0.tgz", + "integrity": "sha512-O+uwGKreKNKkshzZv2P7N64lk6EP17iXBn0PbUnNQhk+Q0AHLstiTrjkx3v5YBd3cxUe7Sq6KyRhl/A0xUjk7Q==", + "license": "MIT", + "dependencies": { + "asap": "~1.0.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.5.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.3.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "license": "MIT", + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.16.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static": { + "version": "1.13.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "license": "ISC" + }, + "node_modules/source-map": { + "version": "0.4.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", + "license": "BSD-3-Clause", + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/statuses": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/transformers": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/transformers/-/transformers-2.1.0.tgz", + "integrity": "sha512-zJf5m2EIOngmBbDe2fhTPpCjzM2qkZVqrFJZc2jaln+KBeEaYKhS2QMOIkfVrNUyoOwqgbTwOHATzr3jZRQDyg==", + "deprecated": "Deprecated, use jstransformer", + "license": "MIT", + "dependencies": { + "css": "~1.0.8", + "promise": "~2.0", + "uglify-js": "~2.2.5" + } + }, + "node_modules/transformers/node_modules/is-promise": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-promise/-/is-promise-1.0.1.tgz", + "integrity": "sha512-mjWH5XxnhMA8cFnDchr6qRP9S/kLntKuEfIYku+PaN1CnS8v+OG9O/BKpRCVRJvpIkgAZm0Pf5Is3iSSOILlcg==", + "license": "MIT" + }, + "node_modules/transformers/node_modules/promise": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/promise/-/promise-2.0.0.tgz", + "integrity": "sha512-OgMc+sxI3zWF8D5BJGtA0z7/IsrDy1/0cPaDv6HPpqa2fSTo7AdON5U10NbZCUeF+zCAj3PtfPE50Hf02386aA==", + "license": "MIT", + "dependencies": { + "is-promise": "~1" + } + }, + "node_modules/transformers/node_modules/source-map": { + "version": "0.1.43", + "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/transformers/node_modules/uglify-js": { + "version": "2.2.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/uglify-js/-/uglify-js-2.2.5.tgz", + "integrity": "sha512-viLk+/8G0zm2aKt1JJAVcz5J/5ytdiNaIsKgrre3yvSUjwVG6ZUujGH7E2TiPigZUwLYCe7eaIUEP2Zka2VJPA==", + "dependencies": { + "optimist": "~0.3.5", + "source-map": "~0.1.7" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://repo.huaweicloud.com/repository/npm/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://repo.huaweicloud.com/repository/npm/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "license": "BSD-2-Clause", + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-js/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "license": "MIT", + "optional": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/with": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/with/-/with-4.0.3.tgz", + "integrity": "sha512-mJZFpyEc1JTAdxhi/vhVeAM2S7vsltEKDiexDDo1HuAzlYKhcVUU6cwY8cHrFYdt82ZNkfKCeyhA3IYFegI0Kg==", + "license": "MIT", + "dependencies": { + "acorn": "^1.0.1", + "acorn-globals": "^1.0.3" + } + }, + "node_modules/with/node_modules/acorn": { + "version": "1.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha512-FsqWmApWGMGLKKNpHt12PMc5AK7BaZee0WRh04fCysmTzHe+rrKOa2MKjORhnzfpe4r0JnfdqHn02iDA9Dqj2A==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "license": "MIT/X11", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "license": "MIT", + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "acorn": { + "version": "2.7.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha512-pXK8ez/pVjqFdAgBkF1YPVRacuLQ9EXBKaKWaeh58WNfMkCmZhOZzu+NtKSPD5PHmCCHheQ5cD29qM1K4QTxIg==" + }, + "acorn-globals": { + "version": "1.0.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/acorn-globals/-/acorn-globals-1.0.9.tgz", + "integrity": "sha512-j3/4pkfih8W4NK22gxVSXcEonTpAHOHh0hu5BoZrKcOsW/4oBPxTi4Yk3SAj+FhC1f3+bRTkXdm4019gw1vg9g==", + "requires": { + "acorn": "^2.1.0" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "asap": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/asap/-/asap-1.0.0.tgz", + "integrity": "sha512-Ej9qjcXY+8Tuy1cNqiwNMwFRXOy9UwgTeMA8LxreodygIPV48lx8PU1ecFxb5ZeU1DpMKxiq6vGLTxcitWZPbA==" + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha512-YQyoqQG3sO8iCmf8+hyVpgHHOv0/hCEFiS4zTGUwTA1HjAFX66wRcNQrVCeJq9pgESMRvUAOvSil5MJlmccuKQ==", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==" + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "character-parser": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/character-parser/-/character-parser-1.2.1.tgz", + "integrity": "sha512-6OEBVBlf/y8LaAphnbAnt743O3zMhlBer+FO5D40H6wqAdU9B1TvuApkejgLW0cvv0tEZNLktv1AnRI+C87ueQ==" + }, + "clean-css": { + "version": "3.4.28", + "resolved": "https://repo.huaweicloud.com/repository/npm/clean-css/-/clean-css-3.4.28.tgz", + "integrity": "sha512-aTWyttSdI2mYi07kWqHi24NUU9YlELFKGOAgFzZjDN1064DMAOy2FBuoyGmkKRlXkbpXd0EVHmiVkbKhKoirTw==", + "requires": { + "commander": "2.8.x", + "source-map": "0.4.x" + }, + "dependencies": { + "commander": { + "version": "2.8.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/commander/-/commander-2.8.1.tgz", + "integrity": "sha512-+pJLBFVk+9ZZdlAOB5WuIElVPPth47hILFkmGym57aq8kwxsowvByvB0DHs1vQAhyMZzdcpTtF0VDKGkSDR4ZQ==", + "requires": { + "graceful-readlink": ">= 1.0.0" + } + } + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "commander": { + "version": "2.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/commander/-/commander-2.6.0.tgz", + "integrity": "sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg==" + }, + "constantinople": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/constantinople/-/constantinople-3.0.2.tgz", + "integrity": "sha512-UnEggAQrmhxuTxlb7n1OsTtagNXWUv2CRlOogZhWOU4jLK4EJEbF8UDSNxuGu+jVtWNtO2j51ab2H1wlBIzF/w==", + "requires": { + "acorn": "^2.1.0" + } + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==" + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, + "cookie": { + "version": "0.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" + }, + "cookie-parser": { + "version": "1.4.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie-parser/-/cookie-parser-1.4.6.tgz", + "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", + "requires": { + "cookie": "0.4.1", + "cookie-signature": "1.0.6" + } + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "css": { + "version": "1.0.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/css/-/css-1.0.8.tgz", + "integrity": "sha512-qmTYWhHk910nQWnGqMAiWWPQlB6tESiWgNebQJmiozOAGcBAQ1+U/UzUOkhdrcshlkSRRiKWodwmVvO0OmnIGg==", + "requires": { + "css-parse": "1.0.4", + "css-stringify": "1.0.5" + } + }, + "css-parse": { + "version": "1.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/css-parse/-/css-parse-1.0.4.tgz", + "integrity": "sha512-pfstzKVRZiHprDXdsmtfH1HYUEw22lzjuHdnpe1hscwoQvgW2C5zDQIBE0RKoALEReTn9W1ECdY8uaT/kO4VfA==" + }, + "css-stringify": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/css-stringify/-/css-stringify-1.0.5.tgz", + "integrity": "sha512-aIThpcErhG5EyHorGqNlTh0TduNBqLrrXLO3x5rku3ZKBxuVfY+T7noyM2G2X/01iQANqJUb6d3+FLoa+N7Xwg==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, + "express": { + "version": "4.16.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "cookie": { + "version": "0.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==" + } + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://repo.huaweicloud.com/repository/npm/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "jade": { + "version": "1.11.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jade/-/jade-1.11.0.tgz", + "integrity": "sha512-J76sbGKeLtu7uwW97Ntzb1UvGnpKTDplYa9ROr2gNRhM+SxvlBSG0Ees3TQ8+7ya2UVkzMEeFxhRhEpN68s7Tg==", + "requires": { + "character-parser": "1.2.1", + "clean-css": "^3.1.9", + "commander": "~2.6.0", + "constantinople": "~3.0.1", + "jstransformer": "0.0.2", + "mkdirp": "~0.5.0", + "transformers": "2.1.0", + "uglify-js": "^2.4.19", + "void-elements": "~2.0.1", + "with": "~4.0.0" + } + }, + "jstransformer": { + "version": "0.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/jstransformer/-/jstransformer-0.0.2.tgz", + "integrity": "sha512-b7tmf91j1ChMuYhwbPBnNgB62dmHuqiHpOdd6QLKzde8HydZqm+ud3qWreGWecSxPBFFNOf1Ozjx0xo2plFdHA==", + "requires": { + "is-promise": "^2.0.0", + "promise": "^6.0.1" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://repo.huaweicloud.com/repository/npm/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "morgan": { + "version": "1.9.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "optimist": { + "version": "0.3.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + "requires": { + "wordwrap": "~0.0.2" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "promise": { + "version": "6.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/promise/-/promise-6.1.0.tgz", + "integrity": "sha512-O+uwGKreKNKkshzZv2P7N64lk6EP17iXBn0PbUnNQhk+Q0AHLstiTrjkx3v5YBd3cxUe7Sq6KyRhl/A0xUjk7Q==", + "requires": { + "asap": "~1.0.0" + } + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==" + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "requires": { + "align-text": "^0.1.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", + "requires": { + "amdefine": ">=0.0.4" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "transformers": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/transformers/-/transformers-2.1.0.tgz", + "integrity": "sha512-zJf5m2EIOngmBbDe2fhTPpCjzM2qkZVqrFJZc2jaln+KBeEaYKhS2QMOIkfVrNUyoOwqgbTwOHATzr3jZRQDyg==", + "requires": { + "css": "~1.0.8", + "promise": "~2.0", + "uglify-js": "~2.2.5" + }, + "dependencies": { + "is-promise": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-promise/-/is-promise-1.0.1.tgz", + "integrity": "sha512-mjWH5XxnhMA8cFnDchr6qRP9S/kLntKuEfIYku+PaN1CnS8v+OG9O/BKpRCVRJvpIkgAZm0Pf5Is3iSSOILlcg==" + }, + "promise": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/promise/-/promise-2.0.0.tgz", + "integrity": "sha512-OgMc+sxI3zWF8D5BJGtA0z7/IsrDy1/0cPaDv6HPpqa2fSTo7AdON5U10NbZCUeF+zCAj3PtfPE50Hf02386aA==", + "requires": { + "is-promise": "~1" + } + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", + "requires": { + "amdefine": ">=0.0.4" + } + }, + "uglify-js": { + "version": "2.2.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/uglify-js/-/uglify-js-2.2.5.tgz", + "integrity": "sha512-viLk+/8G0zm2aKt1JJAVcz5J/5ytdiNaIsKgrre3yvSUjwVG6ZUujGH7E2TiPigZUwLYCe7eaIUEP2Zka2VJPA==", + "requires": { + "optimist": "~0.3.5", + "source-map": "~0.1.7" + } + } + } + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://repo.huaweicloud.com/repository/npm/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://repo.huaweicloud.com/repository/npm/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==" + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "optional": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==" + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==" + }, + "with": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/with/-/with-4.0.3.tgz", + "integrity": "sha512-mJZFpyEc1JTAdxhi/vhVeAM2S7vsltEKDiexDDo1HuAzlYKhcVUU6cwY8cHrFYdt82ZNkfKCeyhA3IYFegI0Kg==", + "requires": { + "acorn": "^1.0.1", + "acorn-globals": "^1.0.3" + }, + "dependencies": { + "acorn": { + "version": "1.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha512-FsqWmApWGMGLKKNpHt12PMc5AK7BaZee0WRh04fCysmTzHe+rrKOa2MKjORhnzfpe4r0JnfdqHn02iDA9Dqj2A==" + } + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } +} diff --git a/MyApplication/shopServer/package.json b/MyApplication/shopServer/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9c0e67ccf1056c036b7984350144283fcff8873c --- /dev/null +++ b/MyApplication/shopServer/package.json @@ -0,0 +1,16 @@ +{ + "name": "shopserver", + "version": "0.0.0", + "private": true, + "scripts": { + "start": "node ./bin/www" + }, + "dependencies": { + "cookie-parser": "~1.4.4", + "debug": "~2.6.9", + "express": "~4.16.1", + "http-errors": "~1.6.3", + "jade": "~1.11.0", + "morgan": "~1.9.1" + } +} diff --git a/MyApplication/shopServer/public/images/0umqz2f31dzt3xgtgace.jpg b/MyApplication/shopServer/public/images/0umqz2f31dzt3xgtgace.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1258fdfbca741fa57530f4998bee92d23c7f6472 Binary files /dev/null and b/MyApplication/shopServer/public/images/0umqz2f31dzt3xgtgace.jpg differ diff --git a/MyApplication/shopServer/public/images/1ar1gi8lbimiyze7rw4h.jpg b/MyApplication/shopServer/public/images/1ar1gi8lbimiyze7rw4h.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ca5492553a02734063d5dd07d4e12131959a556e Binary files /dev/null and b/MyApplication/shopServer/public/images/1ar1gi8lbimiyze7rw4h.jpg differ diff --git a/MyApplication/shopServer/public/images/1gx3g751tym63606bfw7.jpg b/MyApplication/shopServer/public/images/1gx3g751tym63606bfw7.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0b9feef2719d1f44e2297e9486fedc48ac902f42 Binary files /dev/null and b/MyApplication/shopServer/public/images/1gx3g751tym63606bfw7.jpg differ diff --git a/MyApplication/shopServer/public/images/1rb12wuorplppolc9kik.jpg b/MyApplication/shopServer/public/images/1rb12wuorplppolc9kik.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1c65ee05c429d57018d014a9eb0655362e9757cf Binary files /dev/null and b/MyApplication/shopServer/public/images/1rb12wuorplppolc9kik.jpg differ diff --git a/MyApplication/shopServer/public/images/3hplshr168gc8i1c0lq2.jpg b/MyApplication/shopServer/public/images/3hplshr168gc8i1c0lq2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6d7a8bc3facc0c691f40f65db2085021bf71a117 Binary files /dev/null and b/MyApplication/shopServer/public/images/3hplshr168gc8i1c0lq2.jpg differ diff --git a/MyApplication/shopServer/public/images/3yhyi0qbonw483e5lumb.jpg b/MyApplication/shopServer/public/images/3yhyi0qbonw483e5lumb.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b5a48dcc3504102714c3637b57ca98537996d41d Binary files /dev/null and b/MyApplication/shopServer/public/images/3yhyi0qbonw483e5lumb.jpg differ diff --git a/MyApplication/shopServer/public/images/3zum75sjhcjzg3xovxfn.jpg b/MyApplication/shopServer/public/images/3zum75sjhcjzg3xovxfn.jpg new file mode 100644 index 0000000000000000000000000000000000000000..05f138b4fbe9b8a08d5d820ee02df25f57967c72 Binary files /dev/null and b/MyApplication/shopServer/public/images/3zum75sjhcjzg3xovxfn.jpg differ diff --git a/MyApplication/shopServer/public/images/51kc8vrtuv3aptsyiz8e.jpg b/MyApplication/shopServer/public/images/51kc8vrtuv3aptsyiz8e.jpg new file mode 100644 index 0000000000000000000000000000000000000000..40ee854778b07ee2e22eb4d69e494217a9a66a08 Binary files /dev/null and b/MyApplication/shopServer/public/images/51kc8vrtuv3aptsyiz8e.jpg differ diff --git a/MyApplication/shopServer/public/images/5mz2q5vci3skk15cyvzm.jpg b/MyApplication/shopServer/public/images/5mz2q5vci3skk15cyvzm.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8b3c577c2de6395148bf744c50615ac4273ba26d Binary files /dev/null and b/MyApplication/shopServer/public/images/5mz2q5vci3skk15cyvzm.jpg differ diff --git a/MyApplication/shopServer/public/images/73w0k4d40mxjt54btzda.jpg b/MyApplication/shopServer/public/images/73w0k4d40mxjt54btzda.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5a831ff90fffbbd8a8d56aa99b2cadc8d99dad26 Binary files /dev/null and b/MyApplication/shopServer/public/images/73w0k4d40mxjt54btzda.jpg differ diff --git a/MyApplication/shopServer/public/images/7cgjmzif2w2aalka4gms.jpg b/MyApplication/shopServer/public/images/7cgjmzif2w2aalka4gms.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5a3abf04fcc9bdc3179ed1b54f062f8ae6afb61c Binary files /dev/null and b/MyApplication/shopServer/public/images/7cgjmzif2w2aalka4gms.jpg differ diff --git a/MyApplication/shopServer/public/images/7kd3rq9hvtougx3mhnlt.jpg b/MyApplication/shopServer/public/images/7kd3rq9hvtougx3mhnlt.jpg new file mode 100644 index 0000000000000000000000000000000000000000..445a81338189a927a8109da60ca5bc27631e471e Binary files /dev/null and b/MyApplication/shopServer/public/images/7kd3rq9hvtougx3mhnlt.jpg differ diff --git a/MyApplication/shopServer/public/images/7wlj8wggqtju56kmmw7a.jpg b/MyApplication/shopServer/public/images/7wlj8wggqtju56kmmw7a.jpg new file mode 100644 index 0000000000000000000000000000000000000000..036e5718789090eec6f6eb90af88774971f519ba Binary files /dev/null and b/MyApplication/shopServer/public/images/7wlj8wggqtju56kmmw7a.jpg differ diff --git a/MyApplication/shopServer/public/images/8bnshomf8zgw2havnl47.jpg b/MyApplication/shopServer/public/images/8bnshomf8zgw2havnl47.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7f0a788b9c46997825ca67e66f294326ad1dd132 Binary files /dev/null and b/MyApplication/shopServer/public/images/8bnshomf8zgw2havnl47.jpg differ diff --git a/MyApplication/shopServer/public/images/a32tu0fcsx2uqzmz1q4x.jpg b/MyApplication/shopServer/public/images/a32tu0fcsx2uqzmz1q4x.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d8e44a869e9b75fab2478915c7a8158e3a1be96a Binary files /dev/null and b/MyApplication/shopServer/public/images/a32tu0fcsx2uqzmz1q4x.jpg differ diff --git a/MyApplication/shopServer/public/images/a9f88d706914.jpg b/MyApplication/shopServer/public/images/a9f88d706914.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b1f36e1d4441cf42ab1a42d3a8eb1a292158b054 Binary files /dev/null and b/MyApplication/shopServer/public/images/a9f88d706914.jpg differ diff --git a/MyApplication/shopServer/public/images/aZGOT1OjpJmLxG6urQ.jpg b/MyApplication/shopServer/public/images/aZGOT1OjpJmLxG6urQ.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1c7168699a3c1b6d7fed1796ae3f8033643729d9 Binary files /dev/null and b/MyApplication/shopServer/public/images/aZGOT1OjpJmLxG6urQ.jpg differ diff --git a/MyApplication/shopServer/public/images/aho99xnzeej4xm66cpek.jpg b/MyApplication/shopServer/public/images/aho99xnzeej4xm66cpek.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e11fa71756e2ae4ab0a5a17e114f07e0ac92b02f Binary files /dev/null and b/MyApplication/shopServer/public/images/aho99xnzeej4xm66cpek.jpg differ diff --git a/MyApplication/shopServer/public/images/bk4tsfyi2unckw5wzl91.jpg b/MyApplication/shopServer/public/images/bk4tsfyi2unckw5wzl91.jpg new file mode 100644 index 0000000000000000000000000000000000000000..79ec7f98f360a33ba6151be09bd1788c86323b6a Binary files /dev/null and b/MyApplication/shopServer/public/images/bk4tsfyi2unckw5wzl91.jpg differ diff --git a/MyApplication/shopServer/public/images/cop9mdceu84u8tc2jbn3.jpg b/MyApplication/shopServer/public/images/cop9mdceu84u8tc2jbn3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fa277d399d066131530e4b604c4fd53674468bcd Binary files /dev/null and b/MyApplication/shopServer/public/images/cop9mdceu84u8tc2jbn3.jpg differ diff --git a/MyApplication/shopServer/public/images/d3dn9hhryjvfvbracvrf.jpg b/MyApplication/shopServer/public/images/d3dn9hhryjvfvbracvrf.jpg new file mode 100644 index 0000000000000000000000000000000000000000..18b876ea7c195e49fc4f6ae4e04a519a50af4300 Binary files /dev/null and b/MyApplication/shopServer/public/images/d3dn9hhryjvfvbracvrf.jpg differ diff --git a/MyApplication/shopServer/public/images/dz4wtw1gpsmlawpjhnqu.jpg b/MyApplication/shopServer/public/images/dz4wtw1gpsmlawpjhnqu.jpg new file mode 100644 index 0000000000000000000000000000000000000000..92e5a2360623167f7d95cb82c56c9c90c2b535ff Binary files /dev/null and b/MyApplication/shopServer/public/images/dz4wtw1gpsmlawpjhnqu.jpg differ diff --git a/MyApplication/shopServer/public/images/edszk4cuy84855tycdj0.jpg b/MyApplication/shopServer/public/images/edszk4cuy84855tycdj0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fc2f1e94ce97b9ad03c8b19da9ebf96e8ed01189 Binary files /dev/null and b/MyApplication/shopServer/public/images/edszk4cuy84855tycdj0.jpg differ diff --git a/MyApplication/shopServer/public/images/f4v3zb731xbt4r99ku7m.jpg b/MyApplication/shopServer/public/images/f4v3zb731xbt4r99ku7m.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7f3613e69acae3b4751e0ea1bf47bb09e39c9651 Binary files /dev/null and b/MyApplication/shopServer/public/images/f4v3zb731xbt4r99ku7m.jpg differ diff --git a/MyApplication/shopServer/public/images/faca41195272.jpg b/MyApplication/shopServer/public/images/faca41195272.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b5a48dcc3504102714c3637b57ca98537996d41d Binary files /dev/null and b/MyApplication/shopServer/public/images/faca41195272.jpg differ diff --git a/MyApplication/shopServer/public/images/fiwr4q2oqafplj878m29.jpg b/MyApplication/shopServer/public/images/fiwr4q2oqafplj878m29.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b8375416431f6b0f81027f6e545b81d7d0e2a49f Binary files /dev/null and b/MyApplication/shopServer/public/images/fiwr4q2oqafplj878m29.jpg differ diff --git a/MyApplication/shopServer/public/images/jpJmLxG6urQ.jpg b/MyApplication/shopServer/public/images/jpJmLxG6urQ.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0ee07fe4c3c5a134dab45773aab19ab6468706e1 Binary files /dev/null and b/MyApplication/shopServer/public/images/jpJmLxG6urQ.jpg differ diff --git a/MyApplication/shopServer/public/images/jqyyz124gkpjmjf6acbq.jpg b/MyApplication/shopServer/public/images/jqyyz124gkpjmjf6acbq.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2ae63eac7bff64841b61660c1ebaf27736a68bc6 Binary files /dev/null and b/MyApplication/shopServer/public/images/jqyyz124gkpjmjf6acbq.jpg differ diff --git a/MyApplication/shopServer/public/images/jryhgc4r8vobyrl12dh2.jpg b/MyApplication/shopServer/public/images/jryhgc4r8vobyrl12dh2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c276f8a4521680db70f958ad41537a6573254d39 Binary files /dev/null and b/MyApplication/shopServer/public/images/jryhgc4r8vobyrl12dh2.jpg differ diff --git a/MyApplication/shopServer/public/images/nuc483vcxzjbwxxaup7h.jpg b/MyApplication/shopServer/public/images/nuc483vcxzjbwxxaup7h.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d4e5959aeb7ddea54036fc2080466e04c961183b Binary files /dev/null and b/MyApplication/shopServer/public/images/nuc483vcxzjbwxxaup7h.jpg differ diff --git a/MyApplication/shopServer/public/images/qea0skai3ki5ukn9117z.jpg b/MyApplication/shopServer/public/images/qea0skai3ki5ukn9117z.jpg new file mode 100644 index 0000000000000000000000000000000000000000..18cbb43819d9cab849018c598f8959c45e5833eb Binary files /dev/null and b/MyApplication/shopServer/public/images/qea0skai3ki5ukn9117z.jpg differ diff --git a/MyApplication/shopServer/public/images/qp8zytma8e5wxihsopl5.jpg b/MyApplication/shopServer/public/images/qp8zytma8e5wxihsopl5.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e1b2e3073a3dfa52d37f68aaf7a30720eb635b23 Binary files /dev/null and b/MyApplication/shopServer/public/images/qp8zytma8e5wxihsopl5.jpg differ diff --git a/MyApplication/shopServer/public/images/r83hk0bvzaje4io4rtlb.jpg b/MyApplication/shopServer/public/images/r83hk0bvzaje4io4rtlb.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b1f36e1d4441cf42ab1a42d3a8eb1a292158b054 Binary files /dev/null and b/MyApplication/shopServer/public/images/r83hk0bvzaje4io4rtlb.jpg differ diff --git a/MyApplication/shopServer/public/images/rp0ldydjzqykdr7sgh65.jpg b/MyApplication/shopServer/public/images/rp0ldydjzqykdr7sgh65.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0ee07fe4c3c5a134dab45773aab19ab6468706e1 Binary files /dev/null and b/MyApplication/shopServer/public/images/rp0ldydjzqykdr7sgh65.jpg differ diff --git a/MyApplication/shopServer/public/images/s3fqawWswzk.jpg b/MyApplication/shopServer/public/images/s3fqawWswzk.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d4e5959aeb7ddea54036fc2080466e04c961183b Binary files /dev/null and b/MyApplication/shopServer/public/images/s3fqawWswzk.jpg differ diff --git a/MyApplication/shopServer/public/images/tengoka3szcne2l5qdce.jpg b/MyApplication/shopServer/public/images/tengoka3szcne2l5qdce.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f43c33e939cb30647046158f73922bf71374051c Binary files /dev/null and b/MyApplication/shopServer/public/images/tengoka3szcne2l5qdce.jpg differ diff --git a/MyApplication/shopServer/public/images/uyb31c7yfqy95dejvis1.jpg b/MyApplication/shopServer/public/images/uyb31c7yfqy95dejvis1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..19a55f3651bb7a55a25aeb1c8b64bed925098922 Binary files /dev/null and b/MyApplication/shopServer/public/images/uyb31c7yfqy95dejvis1.jpg differ diff --git a/MyApplication/shopServer/public/images/uyzq1pp02s5p8er72xjp.jpg b/MyApplication/shopServer/public/images/uyzq1pp02s5p8er72xjp.jpg new file mode 100644 index 0000000000000000000000000000000000000000..49d179b7ce2d168c0d433b94f8128f6d52130d86 Binary files /dev/null and b/MyApplication/shopServer/public/images/uyzq1pp02s5p8er72xjp.jpg differ diff --git a/MyApplication/shopServer/public/images/vci5gob5ppqfyhru96zf.jpg b/MyApplication/shopServer/public/images/vci5gob5ppqfyhru96zf.jpg new file mode 100644 index 0000000000000000000000000000000000000000..264f3ec8d72ee9180447226097b9b76b4740a965 Binary files /dev/null and b/MyApplication/shopServer/public/images/vci5gob5ppqfyhru96zf.jpg differ diff --git a/MyApplication/shopServer/public/images/vkulf1otmdjyqy2qdg1l.jpg b/MyApplication/shopServer/public/images/vkulf1otmdjyqy2qdg1l.jpg new file mode 100644 index 0000000000000000000000000000000000000000..00870b9023383adae48c00b07a561c7fd347fcc3 Binary files /dev/null and b/MyApplication/shopServer/public/images/vkulf1otmdjyqy2qdg1l.jpg differ diff --git a/MyApplication/shopServer/public/images/xg4a3azuqons3ao0vre5.jpg b/MyApplication/shopServer/public/images/xg4a3azuqons3ao0vre5.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1c7168699a3c1b6d7fed1796ae3f8033643729d9 Binary files /dev/null and b/MyApplication/shopServer/public/images/xg4a3azuqons3ao0vre5.jpg differ diff --git a/MyApplication/shopServer/public/images/xivydckcuy55d340u0ry.jpg b/MyApplication/shopServer/public/images/xivydckcuy55d340u0ry.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4426de60f66cadbe29cee5b8fdb8a9e78a989eea Binary files /dev/null and b/MyApplication/shopServer/public/images/xivydckcuy55d340u0ry.jpg differ diff --git a/MyApplication/shopServer/public/images/xpm2bq95a3ro2lc4vp5u.jpg b/MyApplication/shopServer/public/images/xpm2bq95a3ro2lc4vp5u.jpg new file mode 100644 index 0000000000000000000000000000000000000000..00e33688d1995b953d0eadb3bc119f49eb2c4244 Binary files /dev/null and b/MyApplication/shopServer/public/images/xpm2bq95a3ro2lc4vp5u.jpg differ diff --git a/MyApplication/shopServer/public/images/yg298agms1yh4mlcqw90.jpg b/MyApplication/shopServer/public/images/yg298agms1yh4mlcqw90.jpg new file mode 100644 index 0000000000000000000000000000000000000000..47bf876bdc09b2b8a5b462e9b0ab069ad596acbf Binary files /dev/null and b/MyApplication/shopServer/public/images/yg298agms1yh4mlcqw90.jpg differ diff --git a/MyApplication/shopServer/public/stylesheets/style.css b/MyApplication/shopServer/public/stylesheets/style.css new file mode 100644 index 0000000000000000000000000000000000000000..9453385b9916ce9bc5e88d2f5d8cd8a554223590 --- /dev/null +++ b/MyApplication/shopServer/public/stylesheets/style.css @@ -0,0 +1,8 @@ +body { + padding: 50px; + font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; +} + +a { + color: #00B7FF; +} diff --git a/MyApplication/shopServer/routes/index.js b/MyApplication/shopServer/routes/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ecca96a56b309a315ddf6399155fd2f953031d3b --- /dev/null +++ b/MyApplication/shopServer/routes/index.js @@ -0,0 +1,9 @@ +var express = require('express'); +var router = express.Router(); + +/* GET home page. */ +router.get('/', function(req, res, next) { + res.render('index', { title: 'Express' }); +}); + +module.exports = router; diff --git a/MyApplication/shopServer/routes/users.js b/MyApplication/shopServer/routes/users.js new file mode 100644 index 0000000000000000000000000000000000000000..da0b0281c831eb35c7c01a446ded5798ae8007ec --- /dev/null +++ b/MyApplication/shopServer/routes/users.js @@ -0,0 +1,8 @@ +var express = require('express'); +var router = express.Router(); +const shop_controller = require('../controllers/shopController') + +/* GET users listing. */ +router.get('/', shop_controller.get_shop_list); + +module.exports = router; diff --git a/MyApplication/shopServer/views/error.jade b/MyApplication/shopServer/views/error.jade new file mode 100644 index 0000000000000000000000000000000000000000..51ec12c6a26323d9f5bc51fb98cb1324a739ea4c --- /dev/null +++ b/MyApplication/shopServer/views/error.jade @@ -0,0 +1,6 @@ +extends layout + +block content + h1= message + h2= error.status + pre #{error.stack} diff --git a/MyApplication/shopServer/views/index.jade b/MyApplication/shopServer/views/index.jade new file mode 100644 index 0000000000000000000000000000000000000000..3d63b9a044a859b59259d5e23dd4e68ec8e1f2be --- /dev/null +++ b/MyApplication/shopServer/views/index.jade @@ -0,0 +1,5 @@ +extends layout + +block content + h1= title + p Welcome to #{title} diff --git a/MyApplication/shopServer/views/layout.jade b/MyApplication/shopServer/views/layout.jade new file mode 100644 index 0000000000000000000000000000000000000000..15af079bf7c34e638ba14844efd979ac9111628b --- /dev/null +++ b/MyApplication/shopServer/views/layout.jade @@ -0,0 +1,7 @@ +doctype html +html + head + title= title + link(rel='stylesheet', href='/stylesheets/style.css') + body + block content