q-koa 10.7.6 → 10.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/config.js +12 -10
- package/core/file/plugins/language copy/config.js +42 -0
- package/core/file/plugins/language copy/model.js +21 -0
- package/core/file/plugins/language_type/config.js +25 -0
- package/core/file/plugins/language_type/model.js +42 -0
- package/core/file/plugins/language_value/config.js +21 -0
- package/core/file/plugins/language_value/model.js +34 -0
- package/package.json +2 -1
package/core/config.js
CHANGED
|
@@ -138,18 +138,20 @@ module.exports = {
|
|
|
138
138
|
router.get('/cache/get', app.controller.cache.get)
|
|
139
139
|
router.get('/cache/clear', app.controller.cache.clear)
|
|
140
140
|
}
|
|
141
|
+
if (app.model.weixin) {
|
|
142
|
+
router.get('/weixin/h5_login', app.controller.weixin.h5_login)
|
|
143
|
+
router.get(
|
|
144
|
+
'/weixin/h5_login_callback',
|
|
145
|
+
app.controller.weixin.h5_login_callback
|
|
146
|
+
)
|
|
147
|
+
router.get(
|
|
148
|
+
'/weixin/h5_login_info_callback',
|
|
149
|
+
app.controller.weixin.h5_login_info_callback
|
|
150
|
+
)
|
|
151
|
+
router.get('/weixin/messagePush', app.controller.weixin.messagePush)
|
|
152
|
+
}
|
|
141
153
|
|
|
142
|
-
router.get('/weixin/h5_login', app.controller.weixin.h5_login)
|
|
143
|
-
router.get(
|
|
144
|
-
'/weixin/h5_login_callback',
|
|
145
|
-
app.controller.weixin.h5_login_callback
|
|
146
|
-
)
|
|
147
|
-
router.get(
|
|
148
|
-
'/weixin/h5_login_info_callback',
|
|
149
|
-
app.controller.weixin.h5_login_info_callback
|
|
150
|
-
)
|
|
151
154
|
router.get('/common/getAppConfig', app.controller.common.getAppConfig)
|
|
152
|
-
router.get('/weixin/messagePush', app.controller.weixin.messagePush)
|
|
153
155
|
router.get('/common/createQr', app.controller.common.createQr)
|
|
154
156
|
router.get('/lanhu/:str', async (ctx) => {
|
|
155
157
|
const { str } = ctx.params
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
name: '语言设置',
|
|
3
|
+
belongs: 'page',
|
|
4
|
+
multiple: false,
|
|
5
|
+
availableSort: false,
|
|
6
|
+
order: [],
|
|
7
|
+
referenceSelect: [],
|
|
8
|
+
select: [
|
|
9
|
+
{ key: 'name', symbol: '$like' },
|
|
10
|
+
{
|
|
11
|
+
key: 'type',
|
|
12
|
+
admin: {
|
|
13
|
+
name: 'admin',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
excludes: [],
|
|
18
|
+
limit: 20,
|
|
19
|
+
defaultOrder: [{ sort: 'descending', type: 'id' }],
|
|
20
|
+
comment: {},
|
|
21
|
+
sortOrder: 1,
|
|
22
|
+
reference: [
|
|
23
|
+
{ key: 'operate_language', name: '设置', width: 300, common: true },
|
|
24
|
+
],
|
|
25
|
+
excludeAuth: [],
|
|
26
|
+
include: ((app) => {
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
model: app.model.language_value,
|
|
30
|
+
},
|
|
31
|
+
]
|
|
32
|
+
}).toString(),
|
|
33
|
+
initList: ['language_type'],
|
|
34
|
+
editInline: {},
|
|
35
|
+
autoData: {},
|
|
36
|
+
is_split: false,
|
|
37
|
+
is_split_count: false,
|
|
38
|
+
show_virtual: false,
|
|
39
|
+
modelQuery: {},
|
|
40
|
+
deleteCheckList: [],
|
|
41
|
+
bulkCreateList: [],
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { Sequelize, Random } = require('q-koa')
|
|
2
|
+
|
|
3
|
+
exports.name = {
|
|
4
|
+
type: Sequelize.STRING,
|
|
5
|
+
comment: '说明',
|
|
6
|
+
allowNull: false,
|
|
7
|
+
is_mock: true,
|
|
8
|
+
defaultValue: '',
|
|
9
|
+
sortOrder: 1,
|
|
10
|
+
mock: () => Random.ctitle(),
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports.type = {
|
|
14
|
+
type: Sequelize.ENUM('input', 'textarea', 'content'),
|
|
15
|
+
comment: '类型',
|
|
16
|
+
allowNull: false,
|
|
17
|
+
is_mock: true,
|
|
18
|
+
defaultValue: 'input',
|
|
19
|
+
sortOrder: 2,
|
|
20
|
+
mock: () => ['input', 'textarea', 'content'][Random.integer(0, 2)],
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
name: '语言包',
|
|
3
|
+
belongs: 'page',
|
|
4
|
+
multiple: false,
|
|
5
|
+
availableSort: false,
|
|
6
|
+
order: [],
|
|
7
|
+
referenceSelect: [],
|
|
8
|
+
select: [],
|
|
9
|
+
excludes: [],
|
|
10
|
+
limit: 20,
|
|
11
|
+
defaultOrder: [],
|
|
12
|
+
comment: {},
|
|
13
|
+
sortOrder: 1,
|
|
14
|
+
reference: [],
|
|
15
|
+
excludeAuth: [],
|
|
16
|
+
initList: [],
|
|
17
|
+
editInline: {},
|
|
18
|
+
autoData: {},
|
|
19
|
+
is_split: false,
|
|
20
|
+
is_split_count: false,
|
|
21
|
+
show_virtual: false,
|
|
22
|
+
modelQuery: {},
|
|
23
|
+
deleteCheckList: [],
|
|
24
|
+
bulkCreateList: [],
|
|
25
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const { Sequelize, Random } = require('q-koa');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
exports.name = {
|
|
5
|
+
type: Sequelize.STRING,
|
|
6
|
+
comment: '名字',
|
|
7
|
+
allowNull: false,
|
|
8
|
+
is_mock: true,
|
|
9
|
+
defaultValue: '',
|
|
10
|
+
sortOrder: 1,
|
|
11
|
+
mock: () => Random.ctitle(),
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.ename = {
|
|
15
|
+
type: Sequelize.STRING,
|
|
16
|
+
comment: '名字',
|
|
17
|
+
allowNull: false,
|
|
18
|
+
is_mock: true,
|
|
19
|
+
defaultValue: '',
|
|
20
|
+
sortOrder: 2,
|
|
21
|
+
mock: () => Random.ctitle(),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.key = {
|
|
25
|
+
type: Sequelize.STRING,
|
|
26
|
+
comment: '名字',
|
|
27
|
+
allowNull: false,
|
|
28
|
+
is_mock: true,
|
|
29
|
+
defaultValue: '',
|
|
30
|
+
sortOrder: 3,
|
|
31
|
+
mock: () => Random.ctitle(),
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.is_on = {
|
|
35
|
+
type: Sequelize.BOOLEAN,
|
|
36
|
+
comment: '是否',
|
|
37
|
+
allowNull: false,
|
|
38
|
+
is_mock: true,
|
|
39
|
+
defaultValue: true,
|
|
40
|
+
sortOrder: 4,
|
|
41
|
+
mock: () => Random.boolean(),
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
name: '语言包详情',
|
|
3
|
+
belongs: 'page',
|
|
4
|
+
multiple: false,
|
|
5
|
+
availableSort: false,
|
|
6
|
+
order: [],
|
|
7
|
+
referenceSelect: [],
|
|
8
|
+
select: [],
|
|
9
|
+
excludes: [],
|
|
10
|
+
limit: 20,
|
|
11
|
+
defaultOrder: [],
|
|
12
|
+
sortOrder: 1,
|
|
13
|
+
reference: [],
|
|
14
|
+
excludeAuth: [],
|
|
15
|
+
initList: [],
|
|
16
|
+
is_split: false,
|
|
17
|
+
is_split_count: false,
|
|
18
|
+
show_virtual: false,
|
|
19
|
+
deleteCheckList: [],
|
|
20
|
+
bulkCreateList: [],
|
|
21
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const { Sequelize, Random } = require('q-koa')
|
|
2
|
+
|
|
3
|
+
exports.language_id = {
|
|
4
|
+
type: Sequelize.MEDIUMINT.UNSIGNED,
|
|
5
|
+
comment: '语言设置',
|
|
6
|
+
allowNull: false,
|
|
7
|
+
is_mock: true,
|
|
8
|
+
defaultValue: 0,
|
|
9
|
+
sortOrder: 1,
|
|
10
|
+
mock: () => Random.integer(1, 5),
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports.content = {
|
|
14
|
+
type: Sequelize.TEXT('long'),
|
|
15
|
+
comment: '介绍',
|
|
16
|
+
allowNull: true,
|
|
17
|
+
is_mock: true,
|
|
18
|
+
defaultValue: null,
|
|
19
|
+
sortOrder: 3,
|
|
20
|
+
mock: () => Random.cparagraph(),
|
|
21
|
+
get: function () {
|
|
22
|
+
return this.getDataValue('content') || ''
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.language_type_id = {
|
|
27
|
+
type: Sequelize.MEDIUMINT.UNSIGNED,
|
|
28
|
+
comment: '语言包',
|
|
29
|
+
allowNull: false,
|
|
30
|
+
is_mock: true,
|
|
31
|
+
defaultValue: 1,
|
|
32
|
+
sortOrder: 4,
|
|
33
|
+
mock: () => Random.integer(1, 5),
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "q-koa",
|
|
3
|
-
"version": "10.7.
|
|
3
|
+
"version": "10.7.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"author": "",
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@alicloud/pop-core": "^1.7.9",
|
|
19
20
|
"@sigodenjs/wechatpay": "^2.1.1",
|
|
20
21
|
"ali-oss": "^6.11.2",
|
|
21
22
|
"async-validator": "^3.1.0",
|