diff --git a/app/controllers/helps_controller.rb b/app/controllers/helps_controller.rb index 9aefb5129..8d58663f6 100644 --- a/app/controllers/helps_controller.rb +++ b/app/controllers/helps_controller.rb @@ -25,7 +25,16 @@ class HelpsController < ApplicationController end def feedback - content = "

[#{params[:question_kind]}]

问题页面网址:#{params[:url]}

#{params[:description]}" + if params[:url].blank? + content = "

[#{params[:question_kind]}]

#{params[:description]}" + if params[:attachment_ids] + params[:attachment_ids].each do |attachment_id| + content += "![](/api/attachments/#{attachment_id})↵" + end + end + else + content = "

[#{params[:question_kind]}]

问题页面网址:#{params[:url]}

#{params[:description]}" + end ActiveRecord::Base.transaction do attr = { sender_id: User.current.id, receiver_id: 1, content: content, send_time: Time.now } diff --git a/app/libs/wechat/weapp.rb b/app/libs/wechat/weapp.rb index 9684206cd..ca356b28d 100644 --- a/app/libs/wechat/weapp.rb +++ b/app/libs/wechat/weapp.rb @@ -31,7 +31,9 @@ class Wechat::Weapp cipher.padding = 0 cipher.key = session_key cipher.iv = iv + Rails.logger.info("[Weapp] encrypted_data: #{encrypted_data}") data = cipher.update(encrypted_data) << cipher.final + Rails.logger.info("[Weapp] data: #{data}") result = JSON.parse(data[0...-data.last.ord]) raise Wechat::Error.new(-1, '解密错误') if result.dig('watermark', 'appid') != appid diff --git a/app/views/admins/competition_prize_users/index.xlsx.axlsx b/app/views/admins/competition_prize_users/index.xlsx.axlsx index 63e23a214..0284484dc 100644 --- a/app/views/admins/competition_prize_users/index.xlsx.axlsx +++ b/app/views/admins/competition_prize_users/index.xlsx.axlsx @@ -3,7 +3,7 @@ wb = xlsx_package.workbook wb.styles do |s| blue_cell = s.add_style :bg_color => "FAEBDC", :sz => 10,:height => 25,:b => true, :border => { :style => :thin, :color =>"000000" },:alignment => {wrap_text: true,:horizontal => :center,:vertical => :center} wb.add_worksheet(name: "#{@competition.name}证书审批列表") do |sheet| - sheet.add_row %w(序号 排名 奖项 战队ID 战队名称 姓名 职业 学号 学校名称 学院名称 地区 实名认证 职业认证 手机号码 队长 签领/开户行及银行卡号 审批时间 审批人), :height => 25,:style => blue_cell + sheet.add_row %w(序号 排名 奖项 战队ID 战队名称 姓名 性别 职业 学号 学校名称 学院名称 地区 实名认证 职业认证 手机号码 队长 身份证号 签领/开户行及银行卡号 审批时间 审批人), :height => 25,:style => blue_cell @all_prize_users.each_with_index do |prize_user, index| user = prize_user.user @@ -14,15 +14,17 @@ wb.styles do |s| prize_user.competition_team_id, prize_user.competition_team.name, user.real_name, + user.gender == 1 ? "女" : "男", user.identity, - user.student_id, + user.student_id.present? ? (user.student_id.to_s + "\t") : "--", user.school_name, user.department_name, user.location, user.auth_status, user.pro_status, - user.phone, + user.phone.present? ? (user.phone.to_s + "\t") : "--", prize_user.leader? ? "是" : "-", + user.ID_number.present? ? (user.ID_number.to_s + "\t") : "--", [prize_user.extra&.[]('bank'), prize_user.extra&.[]('second_bank'), prize_user.extra&.[]('card_no')].compact.join('/'), prize_user.approved_at&.strftime('%Y-%m-%d %H:%M'), prize_user.approver&.real_name diff --git a/public/images/educoder/xcx/myinfobanner.png b/public/images/educoder/xcx/myinfobanner.png new file mode 100644 index 000000000..10046e361 Binary files /dev/null and b/public/images/educoder/xcx/myinfobanner.png differ diff --git a/public/react/src/modules/paths/PathDetail/Addshixuns.js b/public/react/src/modules/paths/PathDetail/Addshixuns.js new file mode 100644 index 000000000..6bf60080a --- /dev/null +++ b/public/react/src/modules/paths/PathDetail/Addshixuns.js @@ -0,0 +1,88 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import {Modal,Input} from 'antd'; +class Addshixuns extends Component { + constructor(props) { + super(props); + this.state = { + shixunname:undefined, + shixunzero:false + } + } + + handleChange=(e)=>{ + this.setState({ + shixunname:e.target.value, + }) + + if(e.target.value.length>0){ + this.setState({ + shixunzero:false + }) + } + } + + + modalCancel=()=>{ + this.setState({ + shixunname:undefined, + }) + this.props.modalCancel() + } + + modalSave=()=>{ + let {shixunname}=this.state; + if(shixunname===undefined||shixunname.length===0){ + this.setState({ + shixunzero:true + }) + return + } + this.props.Setaddshixuns(shixunname); + this.props.modalCancel(); + } + + render() { + + return( + + {this.props.Addshixunstype===true?:""} + +
+

+ 实训名称: + + +

+ {this.state.shixunzero===true?

请输入实训名称

:""} +
+ 取消 + 确定 +
+ +
+ +
+ ) + } +} + +export default Addshixuns; \ No newline at end of file diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 159c40475..595a10cc4 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -3,6 +3,7 @@ import {getImageUrl} from 'educoder'; import {Modal,Input,Checkbox,Tooltip,Spin,notification} from "antd"; import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; import Modals from '../../modals/Modals'; +import Addshixuns from './Addshixuns'; import '../ShixunPaths.css'; import axios from 'axios'; import NewShixunModel from '../../courses/coursesPublic/NewShixunModel'; @@ -52,7 +53,8 @@ class DetailCardsEditAndAdd extends Component{ Modalsbottomval:"", ChooseShixunListshixun_list:undefined, stage_nametype:false, - descriptiontype:false + descriptiontype:false, + Addshixunstype:false } this.onDragEnd = this.onDragEnd.bind(this); } @@ -113,9 +115,12 @@ class DetailCardsEditAndAdd extends Component{ for(var z=0; z{ + this.setState({ + Addshixunstype:true, + }) + } + + Getaddshixuns=(value)=>{ + let { + shixuns_listeditlist, + shixuns_listedit, + } = this.state + let newshixuns_listedit=shixuns_listedit; + let list=shixuns_listeditlist + let url='/paths/add_shixun_to_stage.json'; + axios.post(url,{ + name:value + }).then((response) => { + if(response){ + if(response.data){ + newshixuns_listedit.push(response.data); + list.push(response.data.shixun_id); + this.setState({ + shixuns_listedit:newshixuns_listedit, + shixuns_listeditlist:list, + patheditarry:[], + selectShixun:false, + page:1, + }) + } + } + }).catch((error) => { + console.log(error) + }); + } + render(){ let {selectShixun, @@ -340,6 +381,22 @@ class DetailCardsEditAndAdd extends Component{ > + {this.state.Addshixunstype===true?this.Getaddshixuns(value)} + {...this.props} + {...this.state} + />:""} + + { editPanel &&
@@ -371,13 +428,20 @@ class DetailCardsEditAndAdd extends Component{
描述不能超多最大限制300个字符
-

- +

+ this.AddShixunBox()} className="fl defalutGreyBorder color-grey-6 ml37"> 选用实训项目 选择下面实训后,可以通过拖拽进行排序调整

+

+ this.Addshixuns()} className="fl defalutGreyBorder color-grey-6 ml37"> + + 添加实训项目 + 您只需输入实训名称即可完成实训项目的添加,进入实训详情后可进行具体配置操作 +

+ {selectShixun===true? { this.props.idsum===this.props.keys&&this.props.pathCardsedittype===true?
@@ -381,13 +428,21 @@ class DetailCardsEditAndEdit extends Component{ >
描述不能超多最大限制300个字符
-

+ +

选用实训项目 选择下面实训后,可以通过拖拽进行排序调整

+

+ + 添加实训项目 + + 您只需输入实训名称即可完成实训项目的添加,进入实训详情后可进行具体配置操作 +

+ {selectShixun===true? + {/*newContainers*/}
{this.props.user&&this.props.user.main_site===true?
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 551ab2b0e..32051575b 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1284,7 +1284,9 @@ submittojoinclass=(value)=>{