Browse Source

[all][add][group]

zhangwei 3 năm trước cách đây
mục cha
commit
c162d2b096
4 tập tin đã thay đổi với 688 bổ sung45 xóa
  1. BIN
      server/__pycache__/main.cpython-39.pyc
  2. 44 38
      server/main.py
  3. 619 0
      server/nohup.out
  4. 25 7
      src/components/HelloWorld.vue

BIN
server/__pycache__/main.cpython-39.pyc


+ 44 - 38
server/main.py

@@ -1,8 +1,8 @@
 import os
 import requests
 import json
-import time
 import subprocess
+import time
 from flask import Flask,request,redirect
 from flask_cors import CORS 
 app = Flask(__name__,static_folder="static")
@@ -45,10 +45,10 @@ def create_preview(project,page):
     
     path = """ '{"pathName":"%s"}' """ % page
 
-    subprocess.run(wx_cli+ " open --project " + dist_path,shell=True)
-    subprocess.run(wx_cli+ " reset-fileutils --project " + dist_path,shell=True)
+    os.system(wx_cli+ " open --project " + dist_path)
+    os.system(wx_cli+ " reset-fileutils --project " + dist_path)
     f_read = os.popen(wx_cli+" preview  --project "+dist_path+"  --compile-condition "+path+"   --qr-output "+code_img_path+" --qr-format image").read()
-    subprocess.run(wx_cli+ " quit",shell=True)
+    os.system(wx_cli+ " quit")
     if "[error]" in f_read:
         res_json["code"] = 3
         res_json["msg"] = f_read
@@ -113,18 +113,17 @@ def tenant_access_token_by_feishu():
 
     return token
 
-def send_msg_by_feishu(token,img_key,url,project_name,mode_name):
-    # webhook
-    # webhook_url = "https://open.feishu.cn/open-apis/bot/v2/hook/a924b6a5-86ef-4c76-a7e4-eb42056f70cc"
-    webhook_url = url
+def send_msg_by_feishu(token,img_key,chat_id,project_name,mode_name):
+    token = tenant_access_token_by_feishu()
+    url ="https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id"
     headers = {
         "Authorization":"Bearer "+token,
         "Content-Type": "application/json;charset=UTF-8"
     }
     params = {
+        "receive_id":chat_id,
         "msg_type": "post",
-        "content": {
-            "post": {
+        "content": json.dumps({
             "zh_cn": {
                 "title": mode_name+':'+project_name+"小程序预览码",
                 "content": [
@@ -137,12 +136,10 @@ def send_msg_by_feishu(token,img_key,url,project_name,mode_name):
                         }
                     ]]
                 }
-            }
-        }
+        })
     }
-    
-    res = requests.post(webhook_url,headers=headers,data=json.dumps(params)).json()
-    if res["StatusCode"] == 0:
+    res = requests.post(url,headers=headers,data=json.dumps(params)).json()
+    if res["code"] == 0:
         res_json["code"] = 0
         res_json["msg"] = "飞书消息发送成功"
     else:
@@ -150,11 +147,34 @@ def send_msg_by_feishu(token,img_key,url,project_name,mode_name):
         res_json["msg"] = "飞书消息发送失败"
 
 
+# 获取群
+def get_group_by_feishu(token):
+    headers = {
+        "Authorization":"Bearer "+token,
+        "Content-Type": "application/json;charset=UTF-8"
+    }
+    url = "https://open.feishu.cn/open-apis/im/v1/chats"
+    res = requests.get(url,headers=headers).json()
+    data = []
+    for item in res["data"]["items"]:
+        if item["name"]  != '':
+            data.append(item)
+    return data
+
+
+
 @app.route('/')
 def func():    
     # return 'Welcome to auto-mini-program-build-preview server. only can run on MacOS.'
     return redirect("static/dist/index.html")
-     
+
+@app.route('/getGroup')
+def getGroup():
+    token = tenant_access_token_by_feishu()
+    res_json["code"] = 0
+    res_json["data"] = get_group_by_feishu(token)
+    return res_json
+
 @app.route('/send',methods=['POST'])
 def send():
     global send_status
@@ -166,7 +186,7 @@ def send():
         send_status = True
         res_json["code"] = 0
         res_json["msg"] = "成功"
-        webhook_url = request.json["webhook"]
+        chat_id = request.json["chat_id"]
         branch = request.json["branch"]
         page = request.json["page"]
         project = request.json["project"]
@@ -204,11 +224,14 @@ def send():
         if res_json["code"] != 0:
             send_status = False
             return res_json
-        send_msg_by_feishu(token,img_key,webhook_url,project_name,mode_name)
+        send_msg_by_feishu(token,img_key,chat_id,project_name,mode_name)
 
         send_status = False
-    except:
+    except Exception as ex:
         send_status = False
+        res_json["code"] = 9
+        print(ex)
+        res_json["msg"] = ex.args
 
     return res_json
 
@@ -239,23 +262,6 @@ def get_branch():
     res = {"code":0,"data":branch_list}
     return res
 
-if __name__ == '__main__':
-    app.run(host='0.0.0.0', port=7777, debug=False)
-
-
-# token = tenant_access_token_by_feishu()
-# headers = {
-#     "Authorization":"Bearer "+token,
-#     "Content-Type": "application/json;charset=UTF-8"
-# }
-# print(token)
-# url = "https://open.feishu.cn/open-apis/im/v1/chats"
-# res = requests.get(url,headers=headers).json()
-# # print(res)
-# url = "https://open.feishu.cn/open-apis/im/v1/chats/" +"oc_0f843f734a583434e28bda3687ffc241"
-# res = requests.get(url,headers=headers).json()
-# print(res)
 
-
-# https://open.feishu.cn/open-apis/bot/v2/hook/a243326f-90cf-4a70-ba26-a6b202710971
-# https://open.feishu.cn/open-apis/bot/v2/hook/a924b6a5-86ef-4c76-a7e4-eb42056f70cc
+if __name__ == '__main__':
+    app.run(host='0.0.0.0', port=7777, debug=True)

+ 619 - 0
server/nohup.out

@@ -0,0 +1,619 @@
+ * Serving Flask app 'main' (lazy loading)
+ * Environment: production
+   WARNING: This is a development server. Do not use it in a production deployment.
+   Use a production WSGI server instead.
+ * Debug mode: off
+ * Running on all addresses.
+   WARNING: This is a development server. Do not use it in a production deployment.
+ * Running on http://192.168.80.185:7777/ (Press CTRL+C to quit)
+192.168.80.185 - - [21/Oct/2021 16:40:11] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:40:11] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:40:11] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:40:11] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:40:12] "GET /static/dist/assets/element-icons.9c88a535.woff HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:40:12] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:40:12] "GET /getBranch HTTP/1.1" 200 -
+Already on 'master'
+M	package-lock.json
+Your branch is up to date with 'origin/master'.
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+- 
+✔ Installed 9 packages
+✔ Linked 0 latest versions
+✔ Run 0 scripts
+✔ All packages installed (used 23ms(network 21ms), speed 0B/s, json 0(0B), tarball 0B)
+npm WARN The package gulp-copy is included as both a dev and production dependency.
+npm WARN The package gulp-minify-css is included as both a dev and production dependency.
+npm WARN The package gulp-replace is included as both a dev and production dependency.
+npm WARN The package gulp-rm is included as both a dev and production dependency.
+npm WARN The package gulp-sequence is included as both a dev and production dependency.
+
+audited 599 packages in 3.176s
+
+9 packages are looking for funding
+  run `npm fund` for details
+
+found 92 vulnerabilities (3 low, 9 moderate, 59 high, 21 critical)
+  run `npm audit fix` to fix them, or `npm audit` for details
+
+> longvideofactory@1.0.0 build /Users/ice/Documents/work/projects_01/auto-mini-program-tool/server/longVideoFactory
+> gulp build
+
+[16:40:23] Using gulpfile ~/Documents/work/projects_01/auto-mini-program-tool/server/longVideoFactory/gulpfile.js
+[16:40:23] Starting 'build'...
+[16:40:23] Starting 'build:longVideo'...
+[16:40:23] Starting 'longVideo:copy'...
+[16:40:25] Finished 'longVideo:copy' after 1.94 s
+[16:40:25] Starting 'longVideo:less'...
+[16:40:27] Finished 'longVideo:less' after 2.19 s
+[16:40:27] Starting 'longVideo:wxml'...
+[16:40:28] Finished 'longVideo:wxml' after 376 ms
+[16:40:28] Starting 'longVideo:js'...
+[16:40:28] Finished 'longVideo:js' after 732 ms
+[16:40:28] Starting 'longVideo:rm'...
+[16:40:29] Finished 'longVideo:rm' after 264 ms
+[16:40:29] Finished 'build:longVideo' after 5.5 s
+[16:40:29] Starting 'build:vlog'...
+[16:40:29] Starting 'vlog:copy'...
+[16:40:30] Finished 'vlog:copy' after 1.69 s
+[16:40:30] Starting 'vlog:copyicon'...
+[16:40:30] Finished 'vlog:copyicon' after 13 ms
+[16:40:30] Starting 'vlog:copyutils'...
+[16:40:30] Finished 'vlog:copyutils' after 2.6 ms
+[16:40:30] Starting 'vlog:copynetwork'...
+[16:40:30] Finished 'vlog:copynetwork' after 2.8 ms
+[16:40:30] Starting 'vlog:less'...
+[16:40:32] Finished 'vlog:less' after 1.78 s
+[16:40:32] Starting 'vlog:wxml'...
+[16:40:32] Finished 'vlog:wxml' after 365 ms
+[16:40:32] Starting 'vlog:js'...
+[16:40:33] Finished 'vlog:js' after 655 ms
+[16:40:33] Starting 'vlog:copysrc'...
+[16:40:33] Finished 'vlog:copysrc' after 5.52 ms
+[16:40:33] Starting 'vlog:rm'...
+[16:40:33] Finished 'vlog:rm' after 239 ms
+[16:40:33] Finished 'build:vlog' after 4.76 s
+[16:40:33] Starting 'build:video'...
+[16:40:33] Starting 'video:copy'...
+[16:40:35] Finished 'video:copy' after 1.48 s
+[16:40:35] Starting 'video:copyicon'...
+[16:40:35] Finished 'video:copyicon' after 884 μs
+[16:40:35] Starting 'video:copyutils'...
+[16:40:35] Finished 'video:copyutils' after 1.57 ms
+[16:40:35] Starting 'video:copynetwork'...
+[16:40:35] Finished 'video:copynetwork' after 1.91 ms
+[16:40:35] Starting 'video:less'...
+[16:40:37] Finished 'video:less' after 1.64 s
+[16:40:37] Starting 'video:wxml'...
+[16:40:37] Finished 'video:wxml' after 338 ms
+[16:40:37] Starting 'video:js'...
+[16:40:37] Finished 'video:js' after 602 ms
+[16:40:37] Starting 'video:copysrc'...
+[16:40:37] Finished 'video:copysrc' after 4.89 ms
+[16:40:37] Starting 'video:rm'...
+[16:40:38] Finished 'video:rm' after 226 ms
+[16:40:38] Finished 'build:video' after 4.3 s
+[16:40:38] Finished 'build' after 15 s
+
+> longvideofactory@1.0.0 postbuild /Users/ice/Documents/work/projects_01/auto-mini-program-tool/server/longVideoFactory
+> gulp build:post
+
+[16:40:38] Using gulpfile ~/Documents/work/projects_01/auto-mini-program-tool/server/longVideoFactory/gulpfile.js
+[16:40:38] Starting 'build:post'...
+[16:40:38] Starting 'build:iFunny'...
+[16:40:38] Starting 'iFunny:copy'...
+[16:40:40] Finished 'iFunny:copy' after 1.58 s
+[16:40:40] Starting 'iFunny:copynetwork'...
+[16:40:40] Finished 'iFunny:copynetwork' after 14 ms
+[16:40:40] Starting 'iFunny:less'...
+[16:40:42] Finished 'iFunny:less' after 1.95 s
+[16:40:42] Starting 'iFunny:wxml'...
+[16:40:42] Finished 'iFunny:wxml' after 385 ms
+[16:40:42] Starting 'iFunny:js'...
+[16:40:43] Finished 'iFunny:js' after 615 ms
+[16:40:43] Starting 'iFunny:copysrc'...
+[16:40:43] Finished 'iFunny:copysrc' after 3 ms
+[16:40:43] Starting 'iFunny:rm'...
+[16:40:43] Finished 'iFunny:rm' after 222 ms
+[16:40:43] Finished 'build:iFunny' after 4.78 s
+[16:40:43] Starting 'build:iMove'...
+[16:40:43] Starting 'iMove:copy'...
+[16:40:45] Finished 'iMove:copy' after 1.32 s
+[16:40:45] Starting 'iMove:copynetwork'...
+[16:40:45] Finished 'iMove:copynetwork' after 2.02 ms
+[16:40:45] Starting 'iMove:less'...
+[16:40:46] Finished 'iMove:less' after 1.4 s
+[16:40:46] Starting 'iMove:wxml'...
+[16:40:46] Finished 'iMove:wxml' after 327 ms
+[16:40:46] Starting 'iMove:js'...
+[16:40:47] Finished 'iMove:js' after 593 ms
+[16:40:47] Starting 'iMove:copysrc'...
+[16:40:47] Finished 'iMove:copysrc' after 4.05 ms
+[16:40:47] Starting 'iMove:rm'...
+[16:40:47] Finished 'iMove:rm' after 219 ms
+[16:40:47] Finished 'build:iMove' after 3.87 s
+[16:40:47] Starting 'build:shortVideo'...
+[16:40:47] Starting 'shortVideo:copy'...
+[16:40:48] Finished 'shortVideo:copy' after 1.32 s
+[16:40:48] Starting 'shortVideo:copynetwork'...
+[16:40:48] Finished 'shortVideo:copynetwork' after 3.28 ms
+[16:40:48] Starting 'shortVideo:less'...
+[16:40:50] Finished 'shortVideo:less' after 1.48 s
+[16:40:50] Starting 'shortVideo:wxml'...
+[16:40:50] Finished 'shortVideo:wxml' after 388 ms
+[16:40:50] Starting 'shortVideo:js'...
+[16:40:51] Finished 'shortVideo:js' after 533 ms
+[16:40:51] Starting 'shortVideo:copysrc'...
+[16:40:51] Finished 'shortVideo:copysrc' after 5.44 ms
+[16:40:51] Starting 'shortVideo:rm'...
+[16:40:51] Finished 'shortVideo:rm' after 211 ms
+[16:40:51] Finished 'build:shortVideo' after 3.94 s
+[16:40:51] Starting 'build:amazed'...
+[16:40:51] Starting 'amazed:copy'...
+[16:40:52] Finished 'amazed:copy' after 1.24 s
+[16:40:52] Starting 'amazed:copynetwork'...
+[16:40:52] Finished 'amazed:copynetwork' after 2.71 ms
+[16:40:52] Starting 'amazed:less'...
+[16:40:54] Finished 'amazed:less' after 1.37 s
+[16:40:54] Starting 'amazed:wxml'...
+[16:40:54] Finished 'amazed:wxml' after 292 ms
+[16:40:54] Starting 'amazed:js'...
+[16:40:54] Finished 'amazed:js' after 518 ms
+[16:40:54] Starting 'amazed:copysrc'...
+[16:40:54] Finished 'amazed:copysrc' after 3.43 ms
+[16:40:54] Starting 'amazed:rm'...
+[16:40:55] Finished 'amazed:rm' after 199 ms
+[16:40:55] Finished 'build:amazed' after 3.63 s
+[16:40:55] Starting 'build:clip'...
+[16:40:55] Starting 'clip:copy'...
+[16:40:56] Finished 'clip:copy' after 1.14 s
+[16:40:56] Starting 'clip:copynetwork'...
+[16:40:56] Finished 'clip:copynetwork' after 1.81 ms
+[16:40:56] Starting 'clip:less'...
+[16:40:57] Finished 'clip:less' after 1.39 s
+[16:40:57] Starting 'clip:wxml'...
+[16:40:57] Finished 'clip:wxml' after 288 ms
+[16:40:57] Starting 'clip:js'...
+[16:40:58] Finished 'clip:js' after 481 ms
+[16:40:58] Starting 'clip:copysrc'...
+[16:40:58] Finished 'clip:copysrc' after 4.05 ms
+[16:40:58] Starting 'clip:rm'...
+[16:40:58] Finished 'clip:rm' after 229 ms
+[16:40:58] Finished 'build:clip' after 3.54 s
+[16:40:58] Starting 'build:flashSound'...
+[16:40:58] Starting 'flashSound:copy'...
+[16:40:59] Finished 'flashSound:copy' after 776 ms
+[16:40:59] Starting 'flashSound:copyPage'...
+[16:40:59] Finished 'flashSound:copyPage' after 12 ms
+[16:40:59] Starting 'flashSound:copyPage2'...
+[16:40:59] Finished 'flashSound:copyPage2' after 18 ms
+[16:40:59] Starting 'flashSound:less'...
+[16:41:00] Finished 'flashSound:less' after 901 ms
+[16:41:00] Starting 'flashSound:rm'...
+[16:41:00] Finished 'flashSound:rm' after 141 ms
+[16:41:00] Starting 'flashSound:js'...
+[16:41:00] Finished 'flashSound:js' after 296 ms
+[16:41:00] Starting 'flashSound:wxml'...
+[16:41:00] Finished 'flashSound:wxml' after 162 ms
+[16:41:00] Starting 'flashSound:copysrc'...
+[16:41:00] Finished 'flashSound:copysrc' after 4.8 ms
+[16:41:00] Starting 'flashSound:copynetwork'...
+[16:41:00] Finished 'flashSound:copynetwork' after 1.93 ms
+[16:41:00] Finished 'build:flashSound' after 2.32 s
+[16:41:00] Starting 'build:happyStar'...
+[16:41:00] Starting 'happyStar:copy'...
+[16:41:01] Finished 'happyStar:copy' after 733 ms
+[16:41:01] Starting 'happyStar:copyPage'...
+[16:41:01] Finished 'happyStar:copyPage' after 7.28 ms
+[16:41:01] Starting 'happyStar:copyPage2'...
+[16:41:01] Finished 'happyStar:copyPage2' after 33 ms
+[16:41:01] Starting 'happyStar:less'...
+[16:41:02] Finished 'happyStar:less' after 867 ms
+[16:41:02] Starting 'happyStar:rm'...
+[16:41:02] Finished 'happyStar:rm' after 149 ms
+[16:41:02] Starting 'happyStar:js'...
+[16:41:03] Finished 'happyStar:js' after 307 ms
+[16:41:03] Starting 'happyStar:wxml'...
+[16:41:03] Finished 'happyStar:wxml' after 154 ms
+[16:41:03] Starting 'happyStar:copysrc'...
+[16:41:03] Finished 'happyStar:copysrc' after 4.28 ms
+[16:41:03] Starting 'happyStar:copynetwork'...
+[16:41:03] Finished 'happyStar:copynetwork' after 1.99 ms
+[16:41:03] Finished 'build:happyStar' after 2.26 s
+[16:41:03] Starting 'build:gaoxiao'...
+[16:41:03] Starting 'gaoxiao:copy'...
+[16:41:03] Finished 'gaoxiao:copy' after 709 ms
+[16:41:03] Starting 'gaoxiao:copyPage'...
+[16:41:03] Finished 'gaoxiao:copyPage' after 8.54 ms
+[16:41:03] Starting 'gaoxiao:copyPage2'...
+[16:41:04] Finished 'gaoxiao:copyPage2' after 30 ms
+[16:41:04] Starting 'gaoxiao:less'...
+[16:41:04] Finished 'gaoxiao:less' after 831 ms
+[16:41:04] Starting 'gaoxiao:rm'...
+[16:41:04] Finished 'gaoxiao:rm' after 147 ms
+[16:41:04] Starting 'gaoxiao:js'...
+[16:41:05] Finished 'gaoxiao:js' after 295 ms
+[16:41:05] Starting 'gaoxiao:wxml'...
+[16:41:05] Finished 'gaoxiao:wxml' after 157 ms
+[16:41:05] Starting 'gaoxiao:copysrc'...
+[16:41:05] Finished 'gaoxiao:copysrc' after 2.58 ms
+[16:41:05] Starting 'gaoxiao:copynetwork'...
+[16:41:05] Finished 'gaoxiao:copynetwork' after 1.97 ms
+[16:41:05] Finished 'build:gaoxiao' after 2.19 s
+[16:41:05] Finished 'build:post' after 27 s
+- initialize
+
+✖ IDE may already started at port 49606, trying to connect
+
+✔ IDE server started successfully, listening on http://127.0.0.1:52660
+- preparing
+✔ open
+- initialize
+
+✔ IDE server has started, listening on http://127.0.0.1:52660
+- preparing
+✖ preparing
+[error] Error: {"code":10,"message":"Error: 错误 Error: can not find the project - /Users/ice/Documents/work/projects_01/auto-mini-program-tool/server/longVideoFactory/dist/vlog (code 10)"}
+    at Object.t.resetFileUtils (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:234:28697)
+    at processTicksAndRejections (internal/process/task_queues.js:97:5)
+    at async /Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:142:111891
+- initialize
+
+✔ IDE server has started, listening on http://127.0.0.1:52660
+- preparing
+- Fetching AppID (wx89e7eb06478361d7) permissions
+✔ Using AppID: wx89e7eb06478361d7
+- Preview
+✔ preview
+- initialize
+
+✔ IDE server has started, listening on http://127.0.0.1:52660
+- preparing
+✔ quit
+192.168.80.185 - - [21/Oct/2021 16:42:08] "POST /send HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:42:15] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:42:15] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:42:15] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:42:15] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:42:15] "GET /static/dist/assets/element-icons.9c88a535.woff HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:42:15] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:42:16] "GET /getBranch HTTP/1.1" 200 -
+Already on 'master'
+M	package-lock.json
+Your branch is up to date with 'origin/master'.
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+ 1: 0x100d78bad node::Abort() (.cold.1) [/usr/local/bin/node]
+ 2: 0x10003ae85 node_module_register [/usr/local/bin/node]
+ 3: 0x100040c48 node::PlatformInit() [/usr/local/bin/node]
+ 4: 0x1000407e9 node::Start(int, char**) [/usr/local/bin/node]
+ 5: 0x100001034 start [/usr/local/bin/node]
+ 6: 0x3 
+/bin/sh: line 1: 43204 Abort trap: 6           cnpm install
+ 1: 0x100d78bad node::Abort() (.cold.1) [/usr/local/bin/node]
+ 2: 0x10003ae85 node_module_register [/usr/local/bin/node]
+ 3: 0x100040c48 node::PlatformInit() [/usr/local/bin/node]
+ 4: 0x1000407e9 node::Start(int, char**) [/usr/local/bin/node]
+ 5: 0x100001034 start [/usr/local/bin/node]
+/bin/sh: line 1: 43205 Abort trap: 6           npm run build
+192.168.80.185 - - [21/Oct/2021 16:42:22] "POST /send HTTP/1.1" 200 -
+ * Serving Flask app 'main' (lazy loading)
+ * Environment: production
+   WARNING: This is a development server. Do not use it in a production deployment.
+   Use a production WSGI server instead.
+ * Debug mode: off
+ * Running on all addresses.
+   WARNING: This is a development server. Do not use it in a production deployment.
+ * Running on http://192.168.80.185:7777/ (Press CTRL+C to quit)
+192.168.80.185 - - [21/Oct/2021 16:45:39] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:45:39] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:45:39] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+ * Serving Flask app 'main' (lazy loading)
+ * Environment: production
+   WARNING: This is a development server. Do not use it in a production deployment.
+   Use a production WSGI server instead.
+ * Debug mode: off
+ * Running on all addresses.
+   WARNING: This is a development server. Do not use it in a production deployment.
+ * Running on http://192.168.80.185:7777/ (Press CTRL+C to quit)
+192.168.80.185 - - [21/Oct/2021 16:45:54] "GET /static/dist/index.html HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:45:54] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:45:54] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:45:54] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:45:55] "GET /static/dist/assets/element-icons.9c88a535.woff HTTP/1.1" 304 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+192.168.80.185 - - [21/Oct/2021 16:45:55] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:45:55] "GET /getBranch HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /getBranch HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:00] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+Already up to date.
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:46:01] "GET /getBranch HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:46:02] "GET /getBranch HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:46:02] "GET /getBranch HTTP/1.1" 200 -
+Already on 'master'
+M	package-lock.json
+Your branch is up to date with 'origin/master'.
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+ 1: 0x100d78bad node::Abort() (.cold.1) [/usr/local/bin/node]
+ 2: 0x10003ae85 node_module_register [/usr/local/bin/node]
+ 3: 0x100040c48 node::PlatformInit() [/usr/local/bin/node]
+ 4: 0x1000407e9 node::Start(int, char**) [/usr/local/bin/node]
+ 5: 0x100001034 start [/usr/local/bin/node]
+/bin/sh: line 1: 43402 Abort trap: 6           cnpm install
+ 1: 0x100d78bad node::Abort() (.cold.1) [/usr/local/bin/node]
+ 2: 0x10003ae85 node_module_register [/usr/local/bin/node]
+ 3: 0x100040c48 node::PlatformInit() [/usr/local/bin/node]
+ 4: 0x1000407e9 node::Start(int, char**) [/usr/local/bin/node]
+ 5: 0x100001034 start [/usr/local/bin/node]
+ 6: 0x4 
+/bin/sh: line 1: 43403 Abort trap: 6           npm run build
+192.168.80.185 - - [21/Oct/2021 16:46:07] "POST /send HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:46:19] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:19] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:19] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:19] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:46:19] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:46:19] "GET /getBranch HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:46:29] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:29] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:29] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:46:29] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:46:29] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:46:30] "GET /getBranch HTTP/1.1" 200 -
+ * Serving Flask app 'main' (lazy loading)
+ * Environment: production
+   WARNING: This is a development server. Do not use it in a production deployment.
+   Use a production WSGI server instead.
+ * Debug mode: off
+ * Running on all addresses.
+   WARNING: This is a development server. Do not use it in a production deployment.
+ * Running on http://192.168.80.185:7777/ (Press CTRL+C to quit)
+192.168.80.185 - - [21/Oct/2021 16:48:05] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:05] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:05] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:05] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+192.168.80.185 - - [21/Oct/2021 16:48:05] "GET /static/dist/assets/element-icons.9c88a535.woff HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:05] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:48:06] "GET /getBranch HTTP/1.1" 200 -
+192.168.80.185 - - [21/Oct/2021 16:48:08] "GET /static/dist/index.html HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:08] "GET /static/dist/assets/vendor.adaadc93.js HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:08] "GET /static/dist/assets/index.5b87c40b.css HTTP/1.1" 304 -
+192.168.80.185 - - [21/Oct/2021 16:48:08] "GET /static/dist/assets/index.88290a8e.js HTTP/1.1" 304 -
+fatal: destination path 'longVideoFactory' already exists and is not an empty directory.
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+192.168.80.185 - - [21/Oct/2021 16:48:08] "GET /static/dist/favicon.ico HTTP/1.1" 200 -
+Already up to date.
+192.168.80.185 - - [21/Oct/2021 16:48:08] "GET /getBranch HTTP/1.1" 200 -
+Already on 'master'
+M	package-lock.json
+Your branch is up to date with 'origin/master'.
+hint: Pulling without specifying how to reconcile divergent branches is
+hint: discouraged. You can squelch this message by running one of the following
+hint: commands sometime before your next pull:
+hint: 
+hint:   git config pull.rebase false  # merge (the default strategy)
+hint:   git config pull.rebase true   # rebase
+hint:   git config pull.ff only       # fast-forward only
+hint: 
+hint: You can replace "git config" with "git config --global" to set a default
+hint: preference for all repositories. You can also pass --rebase, --no-rebase,
+hint: or --ff-only on the command line to override the configured default per
+hint: invocation.
+Already up to date.
+ 1: 0x100d78bad node::Abort() (.cold.1) [/usr/local/bin/node]
+ 2: 0x10003ae85 node_module_register [/usr/local/bin/node]
+ 3: 0x100040c48 node::PlatformInit() [/usr/local/bin/node]
+ 4: 0x1000407e9 node::Start(int, char**) [/usr/local/bin/node]
+ 5: 0x100001034 start [/usr/local/bin/node]
+ 6: 0x3 
+/bin/sh: line 1: 43550 Abort trap: 6           cnpm install
+ 1: 0x100d78bad node::Abort() (.cold.1) [/usr/local/bin/node]
+ 2: 0x10003ae85 node_module_register [/usr/local/bin/node]
+ 3: 0x100040c48 node::PlatformInit() [/usr/local/bin/node]
+ 4: 0x1000407e9 node::Start(int, char**) [/usr/local/bin/node]
+ 5: 0x100001034 start [/usr/local/bin/node]
+/bin/sh: line 1: 43551 Abort trap: 6           npm run build
+192.168.80.185 - - [21/Oct/2021 16:48:16] "POST /send HTTP/1.1" 200 -

+ 25 - 7
src/components/HelloWorld.vue

@@ -6,8 +6,14 @@
     label-width="120px"
     class="demo-ruleForm"
   >
-    <el-form-item label="webhook 地址" prop="webhook">
-      <el-input v-model="ruleForm.webhook" disabled></el-input>
+    <el-form-item label="群" prop="selected_group">
+      <el-select v-model="ruleForm.selected_group" placeholder="群" filterable>
+        <el-option
+          v-for="item in ruleForm.group"
+          :label="item.name"
+          :value="item.chat_id"
+        ></el-option>
+      </el-select>
     </el-form-item>
     <el-form-item label="项目" prop="selected_project">
       <el-select v-model="ruleForm.selected_project" placeholder="项目">
@@ -78,12 +84,14 @@ export default {
         region: "",
         resource: "",
         desc: "",
+        selected_group:"",
         selected_project: "",
         selected_branch: "",
         selected_mode: "",
         selected_page: "",
         project_name: "",
         mode_name: "",
+        group:[],
         page: [],
         mode: [
           {
@@ -194,10 +202,10 @@ export default {
         ],
       },
       rules: {
-        webhook: [
+        selected_group: [
           {
             required: true,
-            message: "WebHook不能为空",
+            message: "不能为空",
           },
         ],
         selected_project: [
@@ -228,7 +236,8 @@ export default {
     };
   },
   mounted() {
-    this.getBranchpage();
+    this.getBranch();
+    this.getGroup();
   },
   methods: {
     changeProject(item,val) {
@@ -239,8 +248,17 @@ export default {
     clickMode(val) {
       this.ruleForm.mode_name = val;
     },
+    // 获取群
+    getGroup(){
+      axios.get(this.url+"getGroup").then((res) => {
+        res = res.data;
+        if (res.code == 0) {
+          this.ruleForm.group = res.data;
+        }
+      });
+    },
     // 获取分支
-    getBranchpage() {
+    getBranch() {
       axios.get(this.url+"getBranch").then((res) => {
         res = res.data;
         if (res.code == 0) {
@@ -255,7 +273,7 @@ export default {
           axios
             .post(this.url+"send", {
               project: this.ruleForm.selected_project,
-              webhook: this.ruleForm.webhook,
+              chat_id: this.ruleForm.selected_group,
               mode: this.ruleForm.selected_mode,
               page: this.ruleForm.selected_page,
               branch: this.ruleForm.selected_branch,