forked from FlashSoft/node-red-contrib-bizwechat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,774 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
# 对所有文件生效 | ||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# 对后缀名为 md 的文件生效 | ||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
"root": true, | ||
"parserOptions": { | ||
"parser": "babel-eslint", | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"vue", "plugin:vue/recommended" | ||
], | ||
"rules": { | ||
"eqeqeq": 0, | ||
"camelcase": 0, | ||
"vue/html-self-closing": 0, | ||
"vue/max-attributes-per-line": ["error", { | ||
"singleline": 8, | ||
"multiline": { | ||
"max": 1, | ||
"allowFirstLine": false | ||
} | ||
}], | ||
"vue/singleline-html-element-content-newline": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,7 @@ typings/ | |
|
||
# next.js build output | ||
.next | ||
|
||
test.* | ||
.vscode | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,87 @@ | ||
<script type="text/javascript"> | ||
RED.nodes.registerType('bizwechat-configurator', { | ||
category: 'config', | ||
label() { | ||
return this.name || '默认企业微信配置' | ||
}, | ||
defaults: { | ||
name: { | ||
value: '' | ||
}, | ||
port: { | ||
value: '', | ||
required: true | ||
}, | ||
cropid: { | ||
value: '', | ||
required: true | ||
}, | ||
agentid: { | ||
value: '', | ||
required: true | ||
}, | ||
token: { | ||
value: '', | ||
required: true | ||
}, | ||
corpsecret: { | ||
value: '', | ||
required: true | ||
}, | ||
aeskey: { | ||
value: '', | ||
required: true | ||
}, | ||
|
||
} | ||
}) | ||
RED.nodes.registerType('bizwechat-configurator', { | ||
category: 'config', | ||
label () { | ||
return this.name || '默认企业微信配置' | ||
}, | ||
defaults: { | ||
name: { | ||
value: '' | ||
}, | ||
port: { | ||
value: '', | ||
required: true | ||
}, | ||
corpid: { | ||
value: '', | ||
required: true | ||
}, | ||
agentid: { | ||
value: '', | ||
required: true | ||
}, | ||
token: { | ||
value: '', | ||
required: true | ||
}, | ||
corpsecret: { | ||
value: '', | ||
required: true | ||
}, | ||
aeskey: { | ||
value: '', | ||
required: true | ||
}, | ||
client_id:{ | ||
value:'' | ||
}, | ||
client_secret:{ | ||
value:'' | ||
} | ||
} | ||
}) | ||
</script> | ||
<script type="text/x-red" data-template-name="bizwechat-configurator"> | ||
<div class="form-row"> | ||
<label for="node-config-input-name"><i class="icon-tag"></i>名称</label> | ||
<input type="text" id="node-config-input-name" placeholder="默认企业微信配置"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-port"><i></i>port</label> | ||
<label for="node-config-input-port"><i></i>Port</label> | ||
<input type="text" id="node-config-input-port" placeholder="本服务端口"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-cropid"><i></i>Cropid</label> | ||
<input type="text" id="node-config-input-cropid" placeholder="企业ID"> | ||
<label for="node-config-input-corpid"><i></i>Corpid</label> | ||
<input type="text" id="node-config-input-corpid" placeholder="微信企业ID"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-agentid"><i></i>Agentid</label> | ||
<input type="text" id="node-config-input-agentid" placeholder="应用ID"> | ||
</div> | ||
<label for="node-config-input-agentid"><i></i>Agentid</label> | ||
<input type="text" id="node-config-input-agentid" placeholder="微信应用ID"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-corpsecret"><i></i>Secret</label> | ||
<input type="text" id="node-config-input-corpsecret" placeholder="微信应用Secret"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-token"><i></i>Token</label> | ||
<input type="text" id="node-config-input-token" placeholder="自建应用Token"> | ||
<input type="text" id="node-config-input-token" placeholder="微信应用回调Token"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-corpsecret"><i></i>Secret</label> | ||
<input type="text" id="node-config-input-corpsecret" placeholder="自建应用Secret"> | ||
</div> | ||
<label for="node-config-input-aeskey"><i></i>EncAESKey</label> | ||
<input type="text" id="node-config-input-aeskey" placeholder="微信应用回调EncodingAESKey"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-aeskey"><i></i>AESKey</label> | ||
<input type="text" id="node-config-input-aeskey" placeholder="自建应用EncodingAESKey"> | ||
<label style="width: 100%; text-align: center; color: #ccc;">以下内容为开启语音转文字时选填</label> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-client_id"><i></i>APIKey</label> | ||
<input type="text" id="node-config-input-client_id" placeholder="百度语音应用API Key"> | ||
</div> | ||
<div class="form-row"> | ||
<label for="node-config-input-client_secret"><i></i>SecretKey</label> | ||
<input type="text" id="node-config-input-client_secret" placeholder="百度语音应用Secret Key"> | ||
</div> | ||
</script> | ||
<script type="text/x-red" data-help-name="bizwechat-configurator"> | ||
|
||
|
||
</script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
module.exports = (RED) => { | ||
function bizWechatConfiguratorNode(n) { | ||
RED.nodes.createNode(this, n); | ||
|
||
this.name = n.name; | ||
this.port = n.port; | ||
this.cropid = n.cropid; | ||
this.agentid = n.agentid; | ||
this.token = n.token; | ||
this.corpsecret = n.corpsecret | ||
this.aeskey = n.aeskey; | ||
|
||
var node = this; | ||
RED.nodes.registerType('bizwechat-configurator', class { | ||
constructor (config) { | ||
RED.nodes.createNode(this, config) | ||
Object.assign(this, config) | ||
// console.log('configurator config', config) | ||
} | ||
|
||
RED.nodes.registerType("bizwechat-configurator", bizWechatConfiguratorNode); | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.