yuanyiming 1 年間 前
コミット
b74522dee4
1 ファイル変更71 行追加9 行削除
  1. 71 9
      pbl.js

+ 71 - 9
pbl.js

@@ -7,11 +7,15 @@ let axios = require("axios");
 var router = express.Router(); // get an instance of the express Router
 const querystring = require("querystring");
 var mysql = require("./mysql");
-// const _mysqlLabor = ["123.58.32.151", "sc_app"]; //edu數據庫信息
+const _mysqlLabor = ["123.58.32.151", "sc_app"]; //edu數據庫信息
 // const _mysqluser = ["123.58.32.151", "cocorobouser"]; //用户数据库信息
 
-const _mysqlLabor = ["172.16.12.5", "sc_app"]; // 提交的使用用这两个edu數據庫信息
-const _mysqluser = ["172.16.12.5", "cocorobouser"]; //edu數據庫信息
+// const _mysqlLabor = ["127.0.0.1", "sc_app"]; //袁一鸣
+// const _mysqlLabor = ["10.3.13.84", "sc_app"]; //袁一鸣
+
+
+// const _mysqlLabor = ["172.16.12.5", "sc_app"]; // 提交的使用用这两个edu數據庫信息
+// const _mysqluser = ["172.16.12.5", "cocorobouser"]; //edu數據庫信息
 
 var crypto = require("crypto");
 var https = require("https");
@@ -23,7 +27,7 @@ const wx = {
     appid: "wx1260af162664fd04", // 填写用户自己的appid
     secret: "9d399b3aa0a9e8bce68d20e7734b73e0", // 填写用户自己的密钥
 
-    // appid: "wxcf19f82bc4ca3229", // 填写用户自己的appid
+    // appid: "wxcf19f82bc4ca3229", // lqh
     // secret: "148b350f8bbd2daed7c2f75a8b4411aa", // 填写用户自己的密钥
 };
 //統壹處理區域
@@ -69,6 +73,7 @@ router.get("/weChatCode", async (req, res) => {
             grant_type: "authorization_code",
         },
     });
+    console.log(response.data);
     res.send(response.data.openid);
     // QMysql(req, res, "update_NewStatusById");
 });
@@ -93,7 +98,7 @@ router.post("/login", (req, res) => {
     });
 });
 
-//yym查询是否注册过
+//yym查询用户(查询是否注册过
 router.post("/selectUser", (req, res) => {
     console.log(req.body);
     // let { openid } = req.body;
@@ -146,21 +151,78 @@ router.post("/selectSub", (req, res) => {
 //更新用户订阅信息 xlh
 router.post("/updateSub", (req, res) => {
     postmysql3(req, res, "update_sub");
-
-
 });
-//yym 获取用户收藏数据(数组查询)
+//yym 获取用户收藏数据(数组查询)  废弃
 router.post("/selectCollList", (req, res) => {
     console.log('获取',req.body); 
     postmysql3(req, res, "select_collList");
 });
 
-//yym 获取用户订阅数据(数组查询)
+//yym 获取用户订阅数据(数组查询)  废弃
 router.post("/selectSubList", (req, res) => {
     console.log('获取',req.body); 
     postmysql3(req, res, "select_subList");
 });
 
+//yym 获取用户信息
+router.post("/selectUserInfo", (req, res) => {
+    console.log('获取',req.body); 
+    postmysql3(req, res, "select_UserInfo");
+});
+
+//yym 更新用户信息
+router.post("/updateUserInfo", (req, res) => {
+    console.log('获取用户信息',req.body);  
+    postmysql3(req, res, "update_userInfo");
+});
+
+//yym 用户报名收藏等操作  0收藏 1订阅 2报名
+router.post("/insertOperator", (req, res) => {
+    console.log('获取',req.body); 
+    postmysql3(req, res, "insert_operator");
+});
+ 
+
+//yym 查询用户全部报名收藏  0收藏 1订阅 2报名
+router.post("/selectOperator", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "select_operator");
+});
+
+//yym 查询用户 单个 报名收藏 
+router.post("/selectOneOperator", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "select_oneOperator");
+});
+
+//yym 删除用户收藏或订阅
+router.post("/deleteOperator", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "delete_Operator");
+});
+
+//yym 我的发布页面获取要修改的活动数据
+router.post("/selectAmendAct", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "select_amendAct");
+});
+
+//yym 获取活动详情页面是否收藏订阅报名
+router.post("/selectSignup", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "select_signup");
+});
+
+//yym 报名活动
+router.post("/insertSignup", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "insert_Signup");
+});
+//yym 报名活动
+router.post("/updateView", (req, res) => {
+    // console.log('获取',req.body); 
+    postmysql3(req, res, "update_view");
+});
 
 
 //lqh获取活动acid