mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-11 17:42:47 +00:00
del
This commit is contained in:
parent
0206227150
commit
1e068a53ef
@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace addon\hello_world;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插件安装之后单独的插件方法
|
|
||||||
* Class HelloWorld
|
|
||||||
* @package addon\hello_world
|
|
||||||
*/
|
|
||||||
class Addon
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 插件安装执行
|
|
||||||
*/
|
|
||||||
public function install()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插件卸载执行
|
|
||||||
*/
|
|
||||||
public function uninstall()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插件升级执行
|
|
||||||
*/
|
|
||||||
public function upgrade()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
<template>
|
|
||||||
<!-- 内容 -->
|
|
||||||
<div class="content-wrap" v-show="diyStore.editTab == 'content'">
|
|
||||||
<div class="edit-attr-item-wrap">
|
|
||||||
<h3 class="mb-[10px]">文本设置</h3>
|
|
||||||
<el-form label-width="80px" class="px-[10px]">
|
|
||||||
<el-form-item :label="t('blankHeight')">
|
|
||||||
<el-slider v-model="diyStore.editComponent.height" show-input size="small" class="ml-[10px] horz-blank-slider"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 样式 -->
|
|
||||||
<div class="style-wrap" v-show="diyStore.editTab == 'style'">
|
|
||||||
<!-- 组件样式 -->
|
|
||||||
<slot name="style"></slot>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import {t} from '@/lang'
|
|
||||||
import useDiyStore from '@/stores/modules/diy'
|
|
||||||
|
|
||||||
const diyStore = useDiyStore()
|
|
||||||
diyStore.editComponent.ignore = []; // 忽略公共属性
|
|
||||||
|
|
||||||
defineExpose({})
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.horz-blank-slider {
|
|
||||||
.el-slider__input {
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="main-container">
|
|
||||||
<el-card class="box-card !border-none" shadow="never">
|
|
||||||
测试页面
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="main-container">
|
|
||||||
<el-card class="box-card !border-none" shadow="never">
|
|
||||||
站点测试页面
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace addon\hello_world\app\adminapi\controller;
|
|
||||||
|
|
||||||
|
|
||||||
use core\base\BaseAdminController;
|
|
||||||
|
|
||||||
class Index extends BaseAdminController
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 接口数据
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
return success("HELLO_WORLD_RETURN");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
use think\facade\Route;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 路由(注意最好group路由名称与插件名称一致,防止路由冲突)
|
|
||||||
*/
|
|
||||||
Route::group("hello_world", function () {
|
|
||||||
Route::get('index', 'addon\hello_world\app\adminapi\controller\Index@index');
|
|
||||||
});
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'BASIC' => [
|
|
||||||
'title' => get_lang('dict_diy.component_type_basic'),
|
|
||||||
'list' => [
|
|
||||||
'HelloText' => [
|
|
||||||
'title' => 'hello文本',
|
|
||||||
'icon' => 'iconfont-iconhuiyuanzhongxin',
|
|
||||||
'path' => 'edit-hello-text',
|
|
||||||
'support_page' => [],
|
|
||||||
'uses' => 0,
|
|
||||||
'sort' => 10007,
|
|
||||||
'value' => [
|
|
||||||
'height' => 20
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'HELLO_WORLD_LINK' => [
|
|
||||||
'title' => get_lang('dict_diy.hello_world_link'),
|
|
||||||
'child_list' => [
|
|
||||||
[
|
|
||||||
'name' => 'HELLO_WORLD_INDEX',
|
|
||||||
'title' => get_lang('dict_diy.hello_world_index'),
|
|
||||||
'url' => '/addon/hello_world/pages/index',
|
|
||||||
'is_share' => 1,
|
|
||||||
'action' => ''
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'HELLO_WORLD_INFO',
|
|
||||||
'title' => get_lang('dict_diy.hello_world_info'),
|
|
||||||
'url' => '/addon/hello_world/pages/info',
|
|
||||||
'is_share' => 1,
|
|
||||||
'action' => ''
|
|
||||||
],
|
|
||||||
]
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'DIY_INDEX' => [
|
|
||||||
'hello_world_index' => [ // 页面标识
|
|
||||||
"title" => "hello world 首页", // 页面名称
|
|
||||||
'cover' => '', // 页面封面图
|
|
||||||
'preview' => '', // 页面预览图
|
|
||||||
'desc' => '', // 页面描述
|
|
||||||
'mode' => 'diy', // 页面模式:diy:自定义,fixed:固定
|
|
||||||
// 页面数据源
|
|
||||||
"data" => [
|
|
||||||
"global" => [
|
|
||||||
"title" => "hello world首页页面",
|
|
||||||
'pageStartBgColor' => '#F8F8F8',
|
|
||||||
'pageEndBgColor' => '',
|
|
||||||
'pageGradientAngle' => 'to bottom',
|
|
||||||
'bgUrl' => '',
|
|
||||||
'imgWidth' => '',
|
|
||||||
'imgHeight' => '',
|
|
||||||
"bottomTabBarSwitch" => true,
|
|
||||||
"template" => [
|
|
||||||
'textColor' => "#303133",
|
|
||||||
'pageStartBgColor' => '',
|
|
||||||
'pageEndBgColor' => '',
|
|
||||||
'pageGradientAngle' => 'to bottom',
|
|
||||||
'componentStartBgColor' => '',
|
|
||||||
'componentEndBgColor' => '',
|
|
||||||
'componentGradientAngle' => 'to bottom',
|
|
||||||
"topRounded" => 0,
|
|
||||||
"bottomRounded" => 0,
|
|
||||||
"elementBgColor" => "",
|
|
||||||
"topElementRounded" => 0,
|
|
||||||
"bottomElementRounded" => 0,
|
|
||||||
"margin" => [
|
|
||||||
"top" => 0,
|
|
||||||
"bottom" => 0,
|
|
||||||
"both" => 0
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'topStatusBar' => [
|
|
||||||
'bgColor' => "#ffffff",
|
|
||||||
'isTransparent' => false,
|
|
||||||
'isShow' => true,
|
|
||||||
'style' => 'style-1',
|
|
||||||
'textColor' => "#333333",
|
|
||||||
'textAlign' => 'center',
|
|
||||||
],
|
|
||||||
'popWindow' => [
|
|
||||||
'imgUrl' => "",
|
|
||||||
'imgWidth' => '',
|
|
||||||
'imgHeight' => '',
|
|
||||||
'count' => -1,
|
|
||||||
'show' => 0,
|
|
||||||
'link' => [
|
|
||||||
'name' => ""
|
|
||||||
],
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"value" => [
|
|
||||||
[
|
|
||||||
"path" => "edit-image-ads",
|
|
||||||
"id" => "4640ld4k1pu0",
|
|
||||||
"componentName" => "ImageAds",
|
|
||||||
"componentTitle" => "图片广告",
|
|
||||||
"uses" => 0,
|
|
||||||
"list" => [
|
|
||||||
[
|
|
||||||
"link" => [
|
|
||||||
"name" => ""
|
|
||||||
],
|
|
||||||
"imageUrl" => "static/resource/images/diy/banner.png",
|
|
||||||
"imgWidth" => 750,
|
|
||||||
"imgHeight" => 320,
|
|
||||||
"id" => "2xuytp7622w0"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"ignore" => [],
|
|
||||||
'pageStartBgColor' => '',
|
|
||||||
'pageEndBgColor' => '',
|
|
||||||
'pageGradientAngle' => 'to bottom',
|
|
||||||
'componentStartBgColor' => '',
|
|
||||||
'componentEndBgColor' => '',
|
|
||||||
'componentGradientAngle' => 'to bottom',
|
|
||||||
"topRounded" => 0,
|
|
||||||
"bottomRounded" => 0,
|
|
||||||
"elementBgColor" => "",
|
|
||||||
"topElementRounded" => 0,
|
|
||||||
"bottomElementRounded" => 0,
|
|
||||||
"margin" => [
|
|
||||||
"top" => 0,
|
|
||||||
"bottom" => 0,
|
|
||||||
"both" => 0
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'DIY_HELLO_WORLD_INDEX' => [
|
|
||||||
'title' => get_lang('dict_diy.page_hello_world_index'),
|
|
||||||
'page' => '/addon/hello_world/pages/index',
|
|
||||||
'action' => ''
|
|
||||||
],
|
|
||||||
'DIY_HELLO_WORLD_INFO' => [
|
|
||||||
'title' => get_lang('dict_diy.page_hello_world_info'),
|
|
||||||
'page' => '/addon/hello_world/pages/info',
|
|
||||||
'action' => ''
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use app\dict\member\MemberAccountTypeDict;
|
|
||||||
|
|
||||||
return [
|
|
||||||
MemberAccountTypeDict::POINT => [
|
|
||||||
//调整
|
|
||||||
'hello_world_test' => [
|
|
||||||
//名称
|
|
||||||
'name' => "hello_world账户变化",
|
|
||||||
//是否增加
|
|
||||||
'inc' => 1,
|
|
||||||
//是否减少
|
|
||||||
'dec' => 1,
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
];
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
[
|
|
||||||
'menu_name' => '插件站点菜单',
|
|
||||||
'menu_key' => 'niucloud_site_hello',
|
|
||||||
'menu_type' => 1,
|
|
||||||
'icon' => 'iconfont-iconyingyongshichang',
|
|
||||||
'api_url' => '',
|
|
||||||
'router_path' => 'hello_world',
|
|
||||||
'view_path' => 'hello_world/site',
|
|
||||||
'methods' => '',
|
|
||||||
'sort' => 100,
|
|
||||||
'status' => 1,
|
|
||||||
'is_show' => 1,
|
|
||||||
]
|
|
||||||
];
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
//充值成功通知,站点端发送
|
|
||||||
'recharge_success' => [
|
|
||||||
'addon' => 'hello_world',
|
|
||||||
'key' => 'recharge_success',
|
|
||||||
'receiver_type' => 1,
|
|
||||||
'name' => '充值成功通知',
|
|
||||||
'title' => '会员充值成功后发送',
|
|
||||||
'async' => true,
|
|
||||||
'variable' => [
|
|
||||||
'price' => '充值金额',
|
|
||||||
'balance' => '充值后账户',
|
|
||||||
'time' => '充值时间',
|
|
||||||
'trade_no' => '交易单号'
|
|
||||||
],
|
|
||||||
]
|
|
||||||
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'recharge_success' => [
|
|
||||||
'content' => '您充值金额¥{price}, 充值后金额¥{balance}',
|
|
||||||
]
|
|
||||||
|
|
||||||
];
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'recharge_success' => [
|
|
||||||
'tid' => '755',
|
|
||||||
'content' => [
|
|
||||||
['交易单号', '{trade_no}', 'keyword1'],
|
|
||||||
['充值金额', '{price}', 'keyword2'],
|
|
||||||
['账户余额', '{balance}', 'keyword3'],
|
|
||||||
['充值时间', '{time}', 'keyword4'],
|
|
||||||
],
|
|
||||||
'kid_list' => [1, 3, 4, 2],
|
|
||||||
'scene_desc' => ''
|
|
||||||
]
|
|
||||||
];
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'recharge_success' => [
|
|
||||||
'temp_key' => '52552',
|
|
||||||
'keyword_name_list' => [ '充值时间', '充值金额' ],
|
|
||||||
'content' => [
|
|
||||||
[ '充值时间', '{time}', 'time1' ],
|
|
||||||
[ '充值金额', '{price}', 'amount3' ],
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
[
|
|
||||||
'key' => 'addon_schedule',
|
|
||||||
'name' => '插件计划任务',
|
|
||||||
'desc' => '',
|
|
||||||
'time' => [
|
|
||||||
'type' => 'min',
|
|
||||||
'min' => 1
|
|
||||||
],
|
|
||||||
'class' => 'addon\hello_world\app\job\AddonSchedule',
|
|
||||||
'function' => ''
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
//文件执行序列号
|
|
||||||
'bind' => [
|
|
||||||
],
|
|
||||||
|
|
||||||
'listen' => [
|
|
||||||
|
|
||||||
//应用管理
|
|
||||||
'AppManage' => ['addon\hello_world\app\listener\AppManageListener'],
|
|
||||||
],
|
|
||||||
|
|
||||||
'subscribe' => [
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace addon\hello_world\app\job;
|
|
||||||
|
|
||||||
use core\base\BaseJob;
|
|
||||||
use think\facade\Log;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插件计划任务
|
|
||||||
*/
|
|
||||||
class AddonSchedule extends BaseJob
|
|
||||||
{
|
|
||||||
public function doJob()
|
|
||||||
{
|
|
||||||
Log::write('插件计划任务,执行时间:'.date('Y-m-d h:i:s'));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* 插件api接口语言
|
|
||||||
*/
|
|
||||||
return [
|
|
||||||
//系统常用
|
|
||||||
'HELLO_WORLD_RETURN' => 'hello world演示数据',
|
|
||||||
];
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插件枚举语言
|
|
||||||
*/
|
|
||||||
return [
|
|
||||||
'dict_diy' => [
|
|
||||||
'page_hello_world_index' => 'hello 首页',
|
|
||||||
'page_hello_world_info' => 'hello 信息',
|
|
||||||
'hello_world_title' => 'hello world',
|
|
||||||
'hello_world_link' => 'hello world链接',
|
|
||||||
'hello_world_index' => 'hello world index 插件',
|
|
||||||
'hello_world_info' => 'hello world info 插件'
|
|
||||||
],
|
|
||||||
'dict_site_layout' => [
|
|
||||||
'hellow_world' => '你好'
|
|
||||||
]
|
|
||||||
];
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插件验证多语言
|
|
||||||
*/
|
|
||||||
return [
|
|
||||||
'file_sort' => 100,
|
|
||||||
|
|
||||||
];
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
namespace addon\hello_world\app\listener;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用管理
|
|
||||||
* Class AppManage
|
|
||||||
* @package app\listener\hello_world
|
|
||||||
*/
|
|
||||||
class AppManageListener
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 应用管理
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
"category" => [
|
|
||||||
//插件如果要单独分类展示,需要专门定义
|
|
||||||
[
|
|
||||||
"key" => "hello_world_category",
|
|
||||||
"name" => "第三方应用",
|
|
||||||
],
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"addon" => "hello_world",
|
|
||||||
"title" => "hello world",
|
|
||||||
"category" => "hello_world_category", //设置插件对应展示分类,默认basic
|
|
||||||
"desc" => "hello world 应用展示",
|
|
||||||
"icon" => addon_resource("hello_world", "icon.png"), //图标
|
|
||||||
"cover" => "", //封面
|
|
||||||
"url" => "/hello_world"
|
|
||||||
],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Niucloud-admin 企业快速开发的saas管理平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网址:https://www.niucloud-admin.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | niucloud团队 版权所有 开源版本可自由商用
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: Niucloud Team
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
namespace addon\hello_world\app\listener;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 站点端布局
|
|
||||||
*/
|
|
||||||
class SiteLayout
|
|
||||||
{
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
"name" => get_lang("dict_site_layout.hellow_world"),
|
|
||||||
"key" => "hellow",
|
|
||||||
"image" => "static/resource/images/system/layout-hellow.jpg",
|
|
||||||
"sort" => 1
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"title": "hello world",
|
|
||||||
"desc": "Niucloud hello world演示插件",
|
|
||||||
"key": "hello_world",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"author": "niucloud",
|
|
||||||
"type": "app",
|
|
||||||
"support_app": ""
|
|
||||||
}
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"require": {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"weixin-js-sdk": "^1.6.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'pages' => <<<EOT
|
|
||||||
// PAGE_BEGIN
|
|
||||||
{
|
|
||||||
"path": "hello_world/pages/index",
|
|
||||||
"style": {
|
|
||||||
// #ifdef H5
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
// #endif
|
|
||||||
"navigationBarTitleText": "%{{addon_name}}.pages.index%"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// PAGE_END
|
|
||||||
EOT
|
|
||||||
];
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
CREATE TABLE IF NOT EXISTS `{{prefix}}hello_world` (
|
|
||||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci COMMENT='演示插件表';
|
|
||||||
INSERT INTO `{{prefix}}hello_world`(`name`) VALUES ('名称');
|
|
||||||
@ -1 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS `{{prefix}}hello_world`;
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view :style="warpCss">
|
|
||||||
hello-world:演示插件文本——自定义组件
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { computed } from 'vue';
|
|
||||||
import useDiyStore from '@/app/stores/diy';
|
|
||||||
|
|
||||||
const props = defineProps(['component', 'index']);
|
|
||||||
|
|
||||||
const diyStore = useDiyStore();
|
|
||||||
|
|
||||||
const diyComponent = computed(() => {
|
|
||||||
if (diyStore.mode == 'decorate') {
|
|
||||||
return diyStore.value[props.index];
|
|
||||||
} else {
|
|
||||||
return props.component;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const warpCss = computed(() => {
|
|
||||||
var style = '';
|
|
||||||
if (diyComponent.value.componentStartBgColor && diyComponent.value.componentEndBgColor) style += `background:linear-gradient(${diyComponent.value.componentGradientAngle},${diyComponent.value.componentStartBgColor},${diyComponent.value.componentEndBgColor});`;
|
|
||||||
else style += 'background-color:' + diyComponent.value.componentStartBgColor + ';';
|
|
||||||
style += 'border-top-left-radius:' + diyComponent.value.topRounded * 2 + 'rpx;';
|
|
||||||
style += 'border-top-right-radius:' + diyComponent.value.topRounded * 2 + 'rpx;';
|
|
||||||
style += 'border-bottom-left-radius:' + diyComponent.value.bottomRounded * 2 + 'rpx;';
|
|
||||||
style += 'border-bottom-right-radius:' + diyComponent.value.bottomRounded * 2 + 'rpx;';
|
|
||||||
return style;
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style></style>
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
hello-index,固定模板示例,我也可以装修
|
|
||||||
<!-- 自定义模板渲染 -->
|
|
||||||
<diy-group :data="props.data" :pullDownRefreshCount="props.pullDownRefreshCount"></diy-group>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { computed, watch } from 'vue';
|
|
||||||
const props = defineProps(['data', 'pullDownRefreshCount']);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style></style>
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"hello_world.pages.index": "hello_world index"
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"pages.index": "hello_world首页"
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"list": "文章列表",
|
|
||||||
"noData": "~ 暂无数据 ~",
|
|
||||||
"all": "全部",
|
|
||||||
"end": "-- 到底了 --",
|
|
||||||
"searchPlaceholder": "请输入搜索关键词"
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="bg-gray-100 min-h-[100vh]">
|
|
||||||
<view class="fixed top-0 inset-x-0 z-10">
|
|
||||||
hello_world
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<tabbar />
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { reactive, ref, onMounted } from 'vue'
|
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
|
||||||
import { t } from '@/locale'
|
|
||||||
|
|
||||||
import { useShare } from '@/hooks/useShare'
|
|
||||||
|
|
||||||
const { setShare, onShareAppMessage, onShareTimeline } = useShare()
|
|
||||||
setShare()
|
|
||||||
onShareAppMessage()
|
|
||||||
onShareTimeline()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
</style>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user