diff --git a/niucloud/app/service/core/addon/vm/package/uni-app-pages.vm b/niucloud/app/service/core/addon/vm/package/uni-app-pages.vm index 27399973f..e315f636e 100644 --- a/niucloud/app/service/core/addon/vm/package/uni-app-pages.vm +++ b/niucloud/app/service/core/addon/vm/package/uni-app-pages.vm @@ -1,14 +1,19 @@ << + {{hello_world_text}} + + + + + diff --git a/niucloud/app/service/core/addon/vm/vm/package/uni-app-pages.vm b/niucloud/app/service/core/addon/vm/vm/package/uni-app-pages.vm new file mode 100644 index 000000000..e315f636e --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/package/uni-app-pages.vm @@ -0,0 +1,19 @@ + <<middleware([ + AdminCheckToken::class, + AdminCheckRole::class, + AdminLog::class +]); \ No newline at end of file diff --git a/niucloud/app/service/core/addon/vm/vm/system/api_controller.vm b/niucloud/app/service/core/addon/vm/vm/system/api_controller.vm new file mode 100644 index 000000000..d499c0990 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/system/api_controller.vm @@ -0,0 +1,27 @@ +middleware(ApiChannel::class) + ->middleware(ApiCheckToken::class, false) //false表示不验证登录 + ->middleware(ApiLog::class); + + + +Route::group('{key}', function() { + +})->middleware(ApiChannel::class) + ->middleware(ApiCheckToken::class, true) //表示验证登录 + ->middleware(ApiLog::class); + diff --git a/niucloud/app/service/core/addon/vm/vm/system/common.vm b/niucloud/app/service/core/addon/vm/vm/system/common.vm new file mode 100644 index 000000000..6dd355233 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/system/common.vm @@ -0,0 +1,4 @@ + [ + + ], + 'listen' => [ + + ], + 'subscribe' => [ + ], +]; \ No newline at end of file diff --git a/niucloud/app/service/core/addon/vm/vm/system/info.vm b/niucloud/app/service/core/addon/vm/vm/system/info.vm new file mode 100644 index 000000000..891188961 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/system/info.vm @@ -0,0 +1,11 @@ +{ + "title": "{title}", + "desc": "{desc}", + "key": "{key}", + "version": "{version}", + "author": "{author}", + "type": "{type}", + "support_app": "{support_app}", + "compile":[], + "support_version": "{support_version}" +} diff --git a/niucloud/app/service/core/addon/vm/vm/system/menu.vm b/niucloud/app/service/core/addon/vm/vm/system/menu.vm new file mode 100644 index 000000000..c25d0e295 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/system/menu.vm @@ -0,0 +1,33 @@ + '{title}', + 'menu_key' => '{key}', + 'menu_type' => 0, + 'icon' => '', + 'api_url' => '', + 'router_path' => '', + 'view_path' => '', + 'methods' => '', + 'sort' => 100, + 'status' => 1, + 'is_show' => 1, + 'children' => [ + [ + 'menu_name' => '{title}', + 'menu_key' => '{key}_hello_world', + 'menu_type' => 1, + 'icon' => '', + 'api_url' => '{key}/hello_world', + 'router_path' => '{key}/hello_world', + 'view_path' => 'hello_world/index', + 'methods' => 'get', + 'sort' => 100, + 'status' => 1, + 'is_show' => 1, + 'children' => [] + ], + ] + ] +]; diff --git a/niucloud/app/service/core/addon/vm/vm/uni-app/api.vm b/niucloud/app/service/core/addon/vm/vm/uni-app/api.vm new file mode 100644 index 000000000..d6def9df1 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/uni-app/api.vm @@ -0,0 +1,8 @@ + +import request from '@/utils/request' + +/***************************************************** hello world ****************************************************/ +export function getHelloWorld() { + return request.get(`{key}/hello_world`) +} + diff --git a/niucloud/app/service/core/addon/vm/vm/uni-app/lang.vm b/niucloud/app/service/core/addon/vm/vm/uni-app/lang.vm new file mode 100644 index 000000000..311847daa --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/uni-app/lang.vm @@ -0,0 +1,2 @@ +{} + diff --git a/niucloud/app/service/core/addon/vm/vm/uni-app/views.vm b/niucloud/app/service/core/addon/vm/vm/uni-app/views.vm new file mode 100644 index 000000000..777b1a6e1 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/uni-app/views.vm @@ -0,0 +1,18 @@ + + + + diff --git a/niucloud/app/service/core/addon/vm/vm/web/api.vm b/niucloud/app/service/core/addon/vm/vm/web/api.vm new file mode 100644 index 000000000..d2241dfe4 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/web/api.vm @@ -0,0 +1,8 @@ + +/** + * hello world + */ +export function getHelloWorld() { + return request.get('{key}/hello_world') +} + diff --git a/niucloud/app/service/core/addon/vm/vm/web/lang.vm b/niucloud/app/service/core/addon/vm/vm/web/lang.vm new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/web/lang.vm @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/niucloud/app/service/core/addon/vm/vm/web/lang_pages.vm b/niucloud/app/service/core/addon/vm/vm/web/lang_pages.vm new file mode 100644 index 000000000..93efa1d09 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/web/lang_pages.vm @@ -0,0 +1,9 @@ +{ + "pages": { + "{key}": { + "hello_world": { + "index": "hello_world" + } + } + } +} \ No newline at end of file diff --git a/niucloud/app/service/core/addon/vm/vm/web/routes.vm b/niucloud/app/service/core/addon/vm/vm/web/routes.vm new file mode 100644 index 000000000..46674b01a --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/web/routes.vm @@ -0,0 +1,6 @@ +export default [ + { + path: "/{key}/hello_world/index", + component: () => import('~/addon/{key}/pages/hello_world/index.vue') + } +] diff --git a/niucloud/app/service/core/addon/vm/vm/web/view.vm b/niucloud/app/service/core/addon/vm/vm/web/view.vm new file mode 100644 index 000000000..af84acdc7 --- /dev/null +++ b/niucloud/app/service/core/addon/vm/vm/web/view.vm @@ -0,0 +1,15 @@ + + + +