lrf402788946 4 سال پیش
والد
کامیت
c5999b1df4
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 2 2
      app/controller/weixin.js
  2. 1 0
      app/service/school.js

+ 2 - 2
app/controller/weixin.js

@@ -25,8 +25,8 @@ class WeixinController extends Controller {
   //       store - 默认,认证结果写入sessionStore,然后重定向回请求页面(要求请求页面和认证服务在同一域名下)
   //       token - url带上token参数重定向到原始地址
   async auth() {
-    console.log('in function:');
     const { redirect_uri, code, test, type, response_type = 'store', uid, qrcode, msgid, objid } = this.ctx.query;
+    console.log(`code=${code}`);
     if (test) {
       return await this.authTest();
     }
@@ -81,7 +81,7 @@ class WeixinController extends Controller {
     console.log('function in');
     console.log('openid--->' + openid);
     if (openid) {
-      
+
       const { redirect_uri, type, uid, qrcode, msgid, objid } = JSON.parse(val);
       console.log('redirect_uri-->' + redirect_uri);
       const user = await this.ctx.service.user.findByOpenid(openid);

+ 1 - 0
app/service/school.js

@@ -61,6 +61,7 @@ class SchoolService extends CrudService {
       type,
       batchid
     );
+    console.log('in function:');
     // 将得到的数据校验
     const datacheck = await this.datacheck(studatas);
     if (datacheck.errorcode === '1') {