Compare commits

...

25 Commits

Author SHA1 Message Date
puf7keiya e8b2cf9b0d Merge pull request '11' (#21) from LvYH_branch into master
2 years ago
吕一航 f2ee853fd9 v10
2 years ago
puf7keiya 42cb8530fe Merge pull request 'model' (#20) from 冯健铠 into master
2 years ago
吕一航 1cb0ab5e90 model
2 years ago
puf7keiya d45b163273 Merge pull request 'fzh' (#19) from fuzh_branch into master
2 years ago
puf7keiya 19d812d77a Merge pull request 'zyl' (#18) from zyl_branch into master
2 years ago
吕一航 f06e7223ec 11
2 years ago
puf7keiya cd8d23646b Merge pull request 'bxj' (#17) from bxj into master
2 years ago
puf7keiya 38e076e762 Merge pull request 'lyh' (#16) from LvYH_branch into master
2 years ago
吕一航 2b1955b68a 1
2 years ago
吕一航 d6addc344f 1
2 years ago
吕一航 61982e49e8 1
2 years ago
puf7keiya 0cb047beec Merge pull request 'fjk_branch' (#15) from 冯健铠 into master
2 years ago
233 90be77bb76 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into 冯健铠
2 years ago
puf7keiya bd9c26a4c6 Merge pull request 'zyl_branch' (#14) from zyl_branch into master
2 years ago
233 f0c39fdf89 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into zyl_branch
2 years ago
puf7keiya 39339539f9 Merge pull request 'fzh_branch' (#13) from fuzh_branch into master
2 years ago
吕一航 1edcf80796 1
2 years ago
吕一航 2918f956c8 1
2 years ago
吕一航 49ab16d4b0 1
2 years ago
吕一航 5662820a90 1
2 years ago
吕一航 cb5c402d04 11
2 years ago
吕一航 4b4615f806 11
2 years ago
吕一航 14d9809bdd Merge branch '冯健铠' of https://bdgit.educoder.net/puf7keiya/aaaa into 冯健铠
2 years ago
吕一航 4fc440c406 11
2 years ago

@ -0,0 +1,17 @@
# **常态化疫情下的大学生出入校管理系统**
## **系统介绍**
&emsp;&emsp;在常态化疫情防控的背景下,由于大学校园人口密度较大,为防止疫情传入学校造成聚集性传播,学校需对进出校人员进行科学合理的管理。目前针对学生、教职工及校外人员存在的出入校的需求,主要通过申请人提交申请,再由人工对健康码、核酸报告、行程码等信息进行核查。由于学校人口基数大,人工审核可能存在处理不及时、检查不准确等问题,且在当前高中低风险区的划分政策下,风险地区变化较快,人工查阅不一定及时。因此,为降低疫情传播入校的风险,对出入校管理效率和能力的提升成为目前各大学亟待解决的难题,有现实迫切的需求。`<br>`&emsp;&emsp;本软件专为提高疫情期间师生出入校申请、审批的效率而设计,它可以帮助用户(老师、学生)查看天津市本地的疫情状况,帮助用户提交出入校申请,帮助管理员进行自动审批申请表,并在发现异常时提交给管理员进行手动审批,还可以在用户进出学校的时候进行扫码操作变更自己的出入校状态,且能通过界面查看该状态。`<br>`&emsp;
## **配置环境**
前端界面:微信开发者平台 + wxml + wxss + JavaScript `<br>`
后端服务器Python 3.10 + flask框架 + jpype `<br>`
OCR模块Java 1.7以上 + maven + com.baidu.aip `<br>`
数据库SQL server 2019
## **备注**
前端使用微信小程序,该部分代码无法被质量分析软件识别。`<br>`
OCR部分封装成jar包后直接调用jar包部分也无法被质量分析软件识别已将源代码放入/src/client/OCR_baidu文件夹下。

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

@ -0,0 +1,17 @@
# **常态化疫情下的大学生出入校管理系统**
## **系统介绍**
&emsp;&emsp;在常态化疫情防控的背景下,由于大学校园人口密度较大,为防止疫情传入学校造成聚集性传播,学校需对进出校人员进行科学合理的管理。目前针对学生、教职工及校外人员存在的出入校的需求,主要通过申请人提交申请,再由人工对健康码、核酸报告、行程码等信息进行核查。由于学校人口基数大,人工审核可能存在处理不及时、检查不准确等问题,且在当前高中低风险区的划分政策下,风险地区变化较快,人工查阅不一定及时。因此,为降低疫情传播入校的风险,对出入校管理效率和能力的提升成为目前各大学亟待解决的难题,有现实迫切的需求。`<br>`&emsp;&emsp;本软件专为提高疫情期间师生出入校申请、审批的效率而设计,它可以帮助用户(老师、学生)查看天津市本地的疫情状况,帮助用户提交出入校申请,帮助管理员进行自动审批申请表,并在发现异常时提交给管理员进行手动审批,还可以在用户进出学校的时候进行扫码操作变更自己的出入校状态,且能通过界面查看该状态。`<br>`&emsp;
## **配置环境**
前端界面:微信开发者平台 + wxml + wxss + JavaScript `<br>`
后端服务器Python 3.10 + flask框架 + jpype `<br>`
OCR模块Java 1.7以上 + maven + com.baidu.aip `<br>`
数据库SQL server 2019
## **备注**
前端使用微信小程序,该部分代码无法被质量分析软件识别。`<br>`
OCR部分封装成jar包后直接调用jar包部分也无法被质量分析软件识别已将源代码放入/src/client/OCR_baidu文件夹下。

Binary file not shown.

@ -0,0 +1,3 @@
# 默认忽略的文件
/shelf/
/workspace.xml

@ -0,0 +1,12 @@
<component name="ArtifactManager">
<artifact type="jar" name="OCR_baidu:jar">
<output-path>$PROJECT_DIR$/out/artifacts/OCR_baidu_jar</output-path>
<root id="archive" name="OCR_baidu.jar">
<element id="module-output" name="OCR_baidu" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/json-20160810.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/slf4j-simple-1.7.25.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/aip-java-sdk-4.16.11.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/slf4j-api-1.7.25.jar" path-in-jar="/" />
</root>
</artifact>
</component>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
</annotationProcessing>
</component>
</project>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="aip-java-sdk-4.16.11">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/aip-java-sdk-4.16.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="json-20160810">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/json-20160810.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/json-20160810.jar!/" />
</SOURCES>
</library>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="slf4j-api-1.7.25">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="slf4j-simple-1.7.25">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/slf4j-simple-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/OCR_baidu.iml" filepath="$PROJECT_DIR$/OCR_baidu.iml" />
</modules>
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="df78773e-dd80-4766-8285-f044837e315a" name="变更" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2I8n2RJqDuEdA4rT9gP1o3Hi6sl" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true"
}
}]]></component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="默认任务">
<changelist id="df78773e-dd80-4766-8285-f044837e315a" name="变更" comment="" />
<created>1669571873455</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1669571873455</updated>
</task>
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
</project>

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: OCR

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="aip-java-sdk-4.16.11" level="project" />
<orderEntry type="library" name="json-20160810" level="project" />
<orderEntry type="library" name="slf4j-api-1.7.25" level="project" />
<orderEntry type="library" name="slf4j-simple-1.7.25" level="project" />
</component>
</module>

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthCode

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthCode

File diff suppressed because it is too large Load Diff

@ -0,0 +1,138 @@
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
public class CovidTestRep {
private String Name;
private String Time;
private String Status;
public CovidTestRep() {
Name = "";
Time = "";
Status = "";
}
public String getName() {
return Name;
}
public String getData() {
return Time;
}
public String getStatus() {
return Status;
}
public void setStatus(String status) {
Status = status;
}
public void setName(String name) {
Name = name;
}
public void setData(String data) {
Time = data;
}
public void Print() {
System.out.println("Name:" + this.Name);
System.out.println("Data:" + this.Time);
System.out.println("Status:" + this.Status);
}
public static void main(String[] args) {
String path = "C:/Users//16491/eclipse-workspace/OCR_baidu/src/3.jpg";// 初始化一个AipOcr
ocr3(path);
}
public static String Judge(String path) {
CovidTestRep Ctr=new CovidTestRep();
Ctr=ocr3(path);
String StatusNameTime=Ctr.Status+","+Ctr.Name+","+Ctr.Time;
return StatusNameTime;
}
public static CovidTestRep ocr3(String path) {
final String APP_ID = "28049220";
final String API_KEY = "qyKlUy6xSapA89DTPomExteq";
final String SECRET_KEY = "q5EYpXULVh5gC3firLU1nGaymwIwOMBd";
AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
// 可选:设置网络连接参数
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(10000);
// 可选:设置代理服务器地址, http和socket二选一或者均不设置
// client.setHttpProxy("proxy_host", proxy_port); // 设置http代理
// client.setSocketProxy("proxy_host", proxy_port); // 设置socket代理
// 可选设置log4j日志输出格式若不设置则使用默认配置
// 也可以直接通过jvm启动参数设置此环境变量
System.setProperty("aip.log4j.conf", "path/to/your/log4j.properties");
// 调用接口
JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
/*Map<String,Object> m=res.toMap();
Set s=m.entrySet();*//*
for (Object str : s) {
System.out.println(str);
}
//System.out.println(s);*/
String str= res.toString(0);
/*for(int i=0;i<str.length();i++)
{char c=str.charAt(i);
System.out.println(i);
System.out.println(c);
}*/
//System.out.println(str);
String s="";
for(int i=0;i<str.length();i++){
char c=str.charAt(i);
if((c>='a'&&c<='z')||(c>='A'&&c<='Z')||c=='{'||c=='"'||c==':'||c=='}'||c==''||c=='_'){
continue;
}
else
s+=c;
if(c==']')break;
}
//System.out.println(s);
CovidTestRep CTR=new CovidTestRep();
for(int i=0;i<s.length();i++)
{
if(s.charAt(i)=='姓'&&s.charAt(i+1)=='名')
{
String Na= CTR.getName();
i=i+3;
for(;s.charAt(i)!=',';i++)
{
Na+=s.charAt(i);
}
CTR.setName(Na);
}
if(s.charAt(i)=='采'&&s.charAt(i+1)=='样'&&s.charAt(i+2)=='时'&&s.charAt(i+3)=='间')
{
String Da= CTR.getData();
i=i+5;
for(;s.charAt(i)!=',';i++)
{
Da+=s.charAt(i);
}
CTR.setData(Da);
}
if(s.charAt(i)=='检'&&s.charAt(i+1)=='测'&&s.charAt(i+2)=='结'&&s.charAt(i+3)=='果')
{
String St= CTR.getStatus();
i=i+5;
for(;s.charAt(i)!=']';i++)
{
St+=s.charAt(i);
}
CTR.setStatus(St);
}
}
return CTR;
}
}

@ -0,0 +1,129 @@
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
public class HealthCode {
private String Name;
private String Data;
private String Status;
public HealthCode() {
Name = "";
Data = "";
Status = "";
}
public String getName() {
return Name;
}
public String getData() {
return Data;
}
public String getStatus() {
return Status;
}
public void setStatus(String status) {
Status = status;
}
public void setName(String name) {
Name = name;
}
public void setData(String data) {
Data = data;
}
public void Print() {
System.out.println("Name:" + this.Name);
System.out.println("Data:" + this.Data);
System.out.println("Status:" + this.Status);
}
public static void main(String[] args) {
String path = "C:/Users//16491/eclipse-workspace/OCR_baidu/src/1.jpg";
System.out.println(Judge(path));
}
public static String Judge(String path) {
HealthCode H = new HealthCode();
H = ocr1(path);
String StatusNameData = "S"+H.Status + "," + H.Name + "," + H.Data+"E";
return StatusNameData;
}
/*class OCR {
//设置APPID/AK/SK
public OCR(){
}*/
public static HealthCode ocr1(String path) {
final String APP_ID = "28049220";
final String API_KEY = "qyKlUy6xSapA89DTPomExteq";
final String SECRET_KEY = "q5EYpXULVh5gC3firLU1nGaymwIwOMBd";
// 初始化一个AipOcr
AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
// 可选:设置网络连接参数
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(60000);
// 可选:设置代理服务器地址, http和socket二选一或者均不设置
// client.setHttpProxy("proxy_host", proxy_port); // 设置http代理
// client.setSocketProxy("proxy_host", proxy_port); // 设置socket代理
// 可选设置log4j日志输出格式若不设置则使用默认配置
// 也可以直接通过jvm启动参数设置此环境变量
System.setProperty("aip.log4j.conf", "path/to/your/log4j.properties");
// 调用接口
JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
String str= res.toString(0);
int flag = 0;
int flag1 = 0;
int flag2 = 0;
HealthCode HC = new HealthCode();
for (int i = 16; i < str.length(); i++) {
char c = str.charAt(i);
if (c == '[' && flag == 0) {
flag = 1;
} else if (flag == 1 && c == ']') {
break;
} else {
if (i == 27) {
String N = HC.getName();
for (; str.charAt(i) != '\"'; i++) {
N = N + str.charAt(i);
}
HC.setName(N);
}
if (str.charAt(i) == '-' && flag1 == 0) {
flag1 = 1;
String D = HC.getData();
for (i = i - 4; str.charAt(i) != '\"'; i++) {
D = D + str.charAt(i);
}
HC.setData(D);
}
if (str.charAt(i) == '码' && flag2 == 0) {
flag2 = 1;
String S = HC.getStatus();
S = S + str.charAt(i - 1);
HC.setStatus(S);
}
}
}
return HC;
}
}

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthCode

@ -0,0 +1,146 @@
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
public class TripCode {
private String Status;
private String Telephone;
private String Time;
private String District;
public TripCode() {
Status = "";
Telephone = "";
Time = "";
District = "";
}
public void setStatus(String status) {
Status = status;
}
public void setTelephone(String telephone) {
Telephone = telephone;
}
public void setTime(String time) {
Time = time;
}
public void setDistrict(String district) {
District = district;
}
public String getTelephone() {
return Telephone;
}
public String getStatus() {
return Status;
}
public String getDistrict() {
return District;
}
public String getTime() {
return Time;
}
public void Print() {
System.out.println("Status:" + this.Status);
System.out.println("Telephone:" + this.Telephone);
System.out.println("Time:" + this.Time);
System.out.println("District:" + this.District);
}
public static void main(String[] args) {
String path = "C:\\Users\\16491\\Desktop\\1.jpg";
System.out.println(Judge(path));
}
/*};
class OCR2 {
//设置APPID/AK/SK*/
public static String Judge(String path) {
TripCode T = new TripCode();
T = ocr2(path);
String InfM = T.Status + "," + T.Telephone + "," + T.Time + "," + T.District;
return InfM;
}
public static TripCode ocr2(String path) {
final String APP_ID = "28049220";
final String API_KEY = "qyKlUy6xSapA89DTPomExteq";
final String SECRET_KEY = "q5EYpXULVh5gC3firLU1nGaymwIwOMBd";
// 初始化一个AipOcr
AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
// 可选:设置网络连接参数
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(10000);
// 可选:设置代理服务器地址, http和socket二选一或者均不设置
// client.setHttpProxy("proxy_host", proxy_port); // 设置http代理
// client.setSocketProxy("proxy_host", proxy_port); // 设置socket代理
// 可选设置log4j日志输出格式若不设置则使用默认配置
// 也可以直接通过jvm启动参数设置此环境变量
System.setProperty("aip.log4j.conf", "path/to/your/log4j.properties");
// 调用接口
JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
//System.out.println(res);
String str = res.toString(0);
//System.out.println(str);
String s = "";
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '{' || c == '"' || c == ':' || c == '}' || c == '' || c == '_') {
continue;
} else
s += c;
if (c == ']') break;
}
//System.out.println(s);
TripCode TC = new TripCode();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == '的' && s.charAt(i + 1) == '动' && s.charAt(i + 2) == '态' && s.charAt(i + 3) == '行' && s.charAt(i + 4) == '程' && s.charAt(i + 5) == '卡') {
String tel = TC.getTelephone();
for(;s.charAt(i)!=',';i--);
i++;
for (; s.charAt(i) != ','; i++) {
tel += s.charAt(i);
}
TC.setTelephone(tel);
}
if (s.charAt(i) == '请' && s.charAt(i + 1) == '收' && s.charAt(i + 2) == '下') {
String St = TC.getStatus();
i = i + 3;
for (; s.charAt(i) != ','; i++) {
St += s.charAt(i);
}
TC.setStatus(St);
}
if (s.charAt(i) == '更' && s.charAt(i + 1) == '新' && s.charAt(i + 2) == '于') {
String Data = TC.getTime();
i = i + 3;
for (; s.charAt(i) != ','; i++) {
Data += s.charAt(i);
}
TC.setTime(Data);
}
if (s.charAt(i) == '到' && s.charAt(i + 1) == '达' && s.charAt(i + 2) == '或' && s.charAt(i + 3) == '途' && s.charAt(i + 4) == '经') {
String Dis = TC.getDistrict();
i = i + 5;
for (; s.charAt(i) != ']'; i++) {
Dis += s.charAt(i);
}
TC.setDistrict(Dis);
}
}
return TC;
}
}

Binary file not shown.

Binary file not shown.

@ -0,0 +1,66 @@
// pages/v10_auto/v10_auto.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,2 @@
<!--pages/v10_auto/v10_auto.wxml-->
<text>pages/v10_auto/v10_auto.wxml</text>

@ -0,0 +1,71 @@
// pages/v11_success/v11_success.js
Page({
/**
* 页面的初始数据
*/
data: {
},
c1:function(){
wx.switchTab({
url: '/pages/home/home',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,12 @@
<!--pages/v11_success/v11_success.wxml-->
<view style="height: 100rpx;"></view>
<!--按钮-->
<view class="loginBtnView">
<button class="loginBtn" type="warn" >成功提交表单</button>
<view style="height: 100rpx;"></view>
<navigator url="/pages/user/user"><button class="loginBtn" type="primary" >点击返回用户首页</button> </navigator>
<view style="height: 100rpx;"></view>
<button class="loginBtn" type="primary" bindtap="c1" >点击返回首页</button>
</view>

@ -0,0 +1 @@
/* pages/v11_success/v11_success.wxss */

@ -0,0 +1,66 @@
// pages/v10_auto/v10_auto.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,2 @@
<!--pages/v10_auto/v10_auto.wxml-->
<text>pages/v10_auto/v10_auto.wxml</text>

@ -0,0 +1,66 @@
// pages/v12_submit_info/v12_submit_info.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,2 @@
<!--pages/v12_submit_info/v12_submit_info.wxml-->
<text>pages/v12_submit_info/v12_submit_info.wxml</text>

@ -0,0 +1,265 @@
Page({
data: {
name: '', //姓名
sno:" ",//学号
phone: '', //手机号
time:"",//入校时间,
door:"",//校门
city:"",//省市
area:"",//区
address:"",//详细地址
images: [] ,//存放图片的数组
test:[],
},
// 个人简介
bindTextAreaBlur(e) {
this.setData({
describe: e.detail.value
})
},
//点击添加按钮上传图片
chooseImage: function(e) {
var that = this
wx.chooseMedia({
sizeType: ['original', 'compressed'], //可选择原图或压缩后的图片
sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
success: res => {
// console.log(res)
var team_image = wx.getFileSystemManager().readFileSync(res.tempFiles[0].tempFilePath, "base64") //将图片进行base64编码。
if (this.data.images.length <= 2) {
const test = this.data.test.concat(team_image)
const images = this.data.images.concat(res.tempFiles[0].tempFilePath)
// 限制最多只能留下2张照片
that.setData({
test:test,
images: images
})
} else {
wx.showToast({
title: '最多只能选择三张照片',
icon: 'none',
duration: 2000,
mask: true
})
}
}
})
},
removeImage(e) {
const idx = e.target.dataset.idx;
console.log(e.target.dataset.idx);
this.data.images.splice(idx, 1);
var del_image = this.data.images;
this.setData({
images: del_image
})
},
handleImagePreview(e) {
const idx = e.target.dataset.idx
const images = this.data.images
wx.previewImage({
current: images[idx], //当前预览的图片
urls: images, //所有要预览的图片
})
},
upload_info: function() {
var images_list = []; //设置了一个空数组进行储存服务器端图片路径
var phone_reg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/; //手机正则
var that = this;
//验证表单信息
if (that.data.name == '') {
wx.showToast({
title: '姓名不能为空',
icon: 'none',
duration: 2000,
mask: true
})
} else if (that.data.phone == '' || phone_reg.test(that.data.phone) == false) {
wx.showToast({
title: '请输入正确的手机号码',
icon: 'none',
duration: 2000,
mask: true
})
} else {
// 进行request请求
wx.request({
url: 'http://127.0.0.1:2020/out_school',
data: {name:this.data.name,
sno:this.data.sno,
phone:this.data.phone,
time:this.data.time,
door:this.data.door,
city:this.data.city,
area:this.data.area,
address:this.data.address,
// images:this.data.images,
test:this.data.test,
type:'出校'
},
enableCache: true,
enableHttp2: true,
enableQuic: true,
method: 'POST',
timeout: 0,
success: (result) => {
console.log(result)
if(result.data=='1'){
wx.navigateTo({
url: '/pages/v11_success/v11_success',
})
}
if(result.data=='2'){
wx.showModal({
cancelColor: 'cancelColor',
title: '您已经提交过申请,请在通过情况中查看',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else {
console.log('用户点击取消')
}
}
})
}
if(result.data=='3'){
wx.showModal({
cancelColor: 'cancelColor',
title: '您目前状态为出校,不能提交出校申请',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else {
console.log('用户点击取消')
}
}
})
}
},
fail: (res) => {
},
})
}
},
// 姓名
name: function(e) {
// console.log(e)
this.setData({
name: e.detail.value
})
},
// 电话
phone: function(e) {
this.setData({
phone: e.detail.value
})
},
//学号
sno: function(e) {
this.setData({
sno: e.detail.value
})
},
//时间
time: function(e) {
this.setData({
time: e.detail.value
})
},
// 校门
door: function(e) {
this.setData({
door: e.detail.value
})
},
//省市
city: function(e) {
this.setData({
city: e.detail.value
})
},
//区
area: function(e) {
this.setData({
area: e.detail.value
})
},
//详细地址
address: function(e) {
this.setData({
address: e.detail.value
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})

@ -0,0 +1,62 @@
<view class='box'>
<view class="section">
<input placeholder="姓名" bindblur="name" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="学号" bindblur="sno" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input type='number' placeholder="电话" bindblur="phone" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="时间" bindblur="time" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="校门" bindblur="door" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="省市" bindblur="city" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="区" bindblur="area" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="详细地址" bindblur="address" style='background-image: url("/static/image/CAUC.png");' />
</view>
<!-- <view class="section" style='height:165px;'>
<textarea class='texta' bindblur="bindTextAreaBlur" placeholder="个人简介" />
</view> -->
<view class='upload_img'>
<view class='upload_img_btn'>
<view class='title'>
<view class='shu'></view>
<text>核酸报告,健康码图片</text>
</view>
<button type="primary" size="mini" bindtap="chooseImage" class='btn'>添加</button>
</view>
<view class='img_box' id='imgs' style='display:flex;justify-content: space-between;padding-top:10px;'>
<!-- 存放上传的图片的盒子 -->
<block wx:for="{{images}}" wx:key="*this">
<view class="q-image-wrap imgs">
<!-- 图片缩略图 -->
<image class="q-image" src="{{item}}" mode="aspectFill" data-idx="{{index}}" bindtap="handleImagePreview"></image>
<!-- 移除图片的按钮 -->
<view class="q-image-remover delete" data-idx="{{index}}" bindtap="removeImage">删除</view>
</view>
</block>
</view>
</view>
<!-- <view>{{images}}</view> -->
<view class='btn_box'>
<button type="primary" bindtap="upload_info" class='upload_info'>提交表单</button>
</view>
</view>

@ -0,0 +1,265 @@
.box{
background-color: #efeff4;
height: 100%;
width: 100%;
}
.input-placeholder{
font-size: 16px;
}
.section{
width: 100%;
height: 55px;
box-sizing: border-box;
padding-top: 15px;
font-size: 16px;
display: flex;
}
.section input{
width: 90%;
margin: 0 auto;
border-radius: 6px;
background-color:#FFF;
height: 40px;
box-sizing: border-box;
padding-left: 45px;
background-repeat: no-repeat;
background-size: 26px 26px;
background-position: 10px 7px;
}
.sex_age_box{
display: flex;
justify-content: space-between;
box-sizing: border-box;
padding: 0 5%;
}
.section_sex{
width: 47.5%;
margin-top:15px;
background-color: #FFF;
height: 40px;
border-radius: 6px;
font-size: 16px;
color: #777777;
}
.imgs_sex{
width: 26px;
height: 26px;
display: inline-block;
margin: 7px 5% 0 4%;
}
.text_sex{
position: relative;
top: -7px;
}
.section_age{
width: 47.5%;
margin-top:15px;
font-size: 16px;
}
.section_age input{
width: 100%;
margin: 0 auto;
border-radius: 6px;
background-color:#FFF;
height: 40px;
box-sizing: border-box;
padding-left: 45px;
background-repeat: no-repeat;
background-size: 26px 26px;
background-position: 10px 7px;
}
.texta{
width: 90%;
margin: 0 auto;
border-radius: 6px;
background-color:#FFF;
height: 150px;
box-sizing: border-box;
padding-left: 20px;
padding-top: 10px;
}
.upload_img{
width: 90%;
margin: 0 auto;
background-color: #FFF;
margin-top: 15px;
border-radius: 6px;
}
.upload_img_btn{
width: 100%;
height: 60px;
line-height: 60px;
border-bottom:1px solid #dddddd;
display: flex;
justify-content: space-between;
}
.upload_img_btn text{
font-size: 17px;
color: #777777;
margin-left: 10px;
}
.btn{
height: 30px;
margin: 15px 15px 0 0;
}
.img_box{
box-sizing: border-box;
padding: 10px;
}
.imgs{
width: 47.5%;
height: 180px;
}
.imgs image{
width: 100%;
height: 150px;
}
.delete{
text-align: center;
font-size: 16px;
color: red;
height: 30px;
line-height: 30px;
}
.expert_choice{
width: 90%;
margin: 15px auto;
border-radius: 6px;
background-color: #FFF;
box-sizing: border-box;
padding: 0 15px 15px 15px;
font-size: 17px;
}
.msg{
color: #777777;
}
.choice_box{
display: flex;
flex-direction: column;
margin-top: 10px;
width: 100%;
background: linear-gradient(to right, #A4DFA5 , #86D78A ,#A4DFA5);
box-sizing: border-box;
padding: 15px;
color: #FFF;
border-radius: 6px;
text-align: center;
}
.choice_msg{
margin-top: 10px;
font-size: 13px;
color: #000;
}
.expert_checkbox{
margin-top: 20px;
font-size: 12px;
color: #777777;
}
.checkbox{
margin-bottom: 15px;
}
checkbox-group{
display: flex;
flex-direction: column;
}
checkbox .wx-checkbox-input{
border-radius: 50%;
height: 18px;
width: 18px;
margin-top: -4px;
}
/* 日期选择 */
.picker_group {
height: 85rpx;
line-height: 85rpx;
justify-content: center;
display: flex;
align-items: center;
font-size: 30rpx;
color: #888;
border-bottom: 1rpx solid #efefef;
}
.picker_group picker {
/* background-color: yellow; */
color: #64bff1;
height: 55rpx;
line-height: 55rpx;
margin: 0 2%;
padding: 0 2%;
border: 1rpx solid #64bff1;
border-radius: 30rpx;
}
.me_interval{
width: 90%;
margin: 0 auto;
background-color: #FFF;
border-radius: 6px;
box-sizing: border-box;
}
.me_interval text{
font-size: 17px;
color: #777777;
margin-left: 15px;
}
.picker_group{
margin-top: 10px;
padding-bottom: 10px;
border: none;
}
.picker_group picker{
padding: 0 5%;
}
.hospitalize{
width: 90%;
margin: 15px auto;
background-color: #FFF;
border-radius: 6px;
box-sizing: border-box;
}
.hospitalize text{
font-size: 17px;
color: #777777;
margin-left: 15px;
}
.radio-group{
margin-left: 15px;
font-size: 15px;
color: #777777;
display: flex;
flex-direction: column;
line-height: 35px;
}
.btn_box{
box-sizing: border-box;
padding: 20px 5% 50px;
}
.name_box{
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.name_box input{
width: 47.5%;
height: 30px;
border: 1px solid #DDD;
border-radius: 6px;
box-sizing: border-box;
padding-left: 15px;
}
.hedden{
display: none;
}
.show{
display: flex;
}
.title{
display: flex;
}
.shu{
width: 3px;
height: 26px;
background: #07afff;
margin: 17px 0 15px 17px;
}

@ -0,0 +1,269 @@
Page({
data: {
name: '', //姓名
sno:" ",//学号
phone: '', //手机号
time:"",//入校时间,
door:"",//校门
city:"",//省市
area:"",//区
address:"",//详细地址
images: [] ,//存放图片的数组
test:[],
xxx:"",
},
// 个人简介
bindTextAreaBlur(e) {
this.setData({
describe: e.detail.value
})
},
//点击添加按钮上传图片
chooseImage: function(e) {
var that = this
wx.chooseMedia({
sizeType: ['original', 'compressed'], //可选择原图或压缩后的图片
sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
success: res => {
// console.log(res)
var team_image = wx.getFileSystemManager().readFileSync(res.tempFiles[0].tempFilePath, "base64") //将图片进行base64编码。
console.log(team_image)
if (this.data.images.length <= 2) {
const test = this.data.test.concat(team_image)
const images = this.data.images.concat(res.tempFiles[0].tempFilePath)
// 限制最多只能留下2张照片
that.setData({
test:test,
images: images
})
} else {
wx.showToast({
title: '最多只能选择三张照片',
icon: 'none',
duration: 2000,
mask: true
})
}
}
})
},
removeImage(e) {
const idx = e.target.dataset.idx;
console.log(e.target.dataset.idx);
this.data.images.splice(idx, 1);
var del_image = this.data.images;
this.setData({
images: del_image
})
},
handleImagePreview(e) {
const idx = e.target.dataset.idx
const images = this.data.images
wx.previewImage({
current: images[idx], //当前预览的图片
urls: images, //所有要预览的图片
})
},
upload_info: function() {
var images_list = []; //设置了一个空数组进行储存服务器端图片路径
var phone_reg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/; //手机正则
var that = this;
//验证表单信息
if (that.data.name == '') {
wx.showToast({
title: '姓名不能为空',
icon: 'none',
duration: 2000,
mask: true
})
} else if (that.data.phone == '' || phone_reg.test(that.data.phone) == false) {
wx.showToast({
title: '请输入正确的手机号码',
icon: 'none',
duration: 2000,
mask: true
})
} else {
// 进行request请求
wx.request({
url: 'http://127.0.0.1:2020/in_school',
data: {name:this.data.name,
sno:this.data.sno,
phone:this.data.phone,
time:this.data.time,
door:this.data.door,
city:this.data.city,
area:this.data.area,
address:this.data.address,
// images:this.data.images,
test:this.data.test,
type:'入校'
},
enableCache: true,
enableHttp2: true,
enableQuic: true,
method: 'POST',
timeout: 0,
success: (result) => {
console.log(result)
if(result.data=='1'){
wx.navigateTo({
url: '/pages/v11_success/v11_success',
})
}
if(result.data=='2'){
wx.showModal({
cancelColor: 'cancelColor',
title: '您已经提交过申请,请在通过情况中查看',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else {
console.log('用户点击取消')
}
}
})
}
if(result.data=='3'){
wx.showModal({
cancelColor: 'cancelColor',
title: '您目前状态为入校,不能提交入校申请',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else {
console.log('用户点击取消')
}
}
})
}
},
fail: (res) => {
},
})
}
},
// 姓名
name: function(e) {
// console.log(e)
this.setData({
name: e.detail.value
})
},
// 电话
phone: function(e) {
this.setData({
phone: e.detail.value
})
},
//学号
sno: function(e) {
this.setData({
sno: e.detail.value
})
},
//时间
time: function(e) {
this.setData({
time: e.detail.value
})
},
// 校门
door: function(e) {
this.setData({
door: e.detail.value
})
},
//省市
city: function(e) {
this.setData({
city: e.detail.value
})
},
//区
area: function(e) {
this.setData({
area: e.detail.value
})
},
//详细地址
address: function(e) {
this.setData({
address: e.detail.value
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})

@ -0,0 +1,67 @@
<view class='box'>
<view class="section">
<input placeholder="姓名" bindblur="name" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="学号" bindblur="sno" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input type='number' placeholder="电话" bindblur="phone" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="时间" bindblur="time" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="校门" bindblur="door" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="省市" bindblur="city" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="区" bindblur="area" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view class="section">
<input placeholder="详细地址" bindblur="address" style='background-image: url("/static/image/CAUC.png");' />
</view>
<!-- <view class="section">
<input model:value="{{xxx}}" placeholder="xxxx" bindblur="address" style='background-image: url("/static/image/CAUC.png");' />
</view>
<view>{{xxx}}</view> -->
<!-- <view class="section" style='height:165px;'>
<textarea class='texta' bindblur="bindTextAreaBlur" placeholder="个人简介" />
</view> -->
<view class='upload_img'>
<view class='upload_img_btn'>
<view class='title'>
<view class='shu'></view>
<text>核酸报告,健康码图片</text>
</view>
<button type="primary" size="mini" bindtap="chooseImage" class='btn'>添加</button>
</view>
<view class='img_box' id='imgs' style='display:flex;justify-content: space-between;padding-top:10px;'>
<!-- 存放上传的图片的盒子 -->
<block wx:for="{{images}}" wx:key="*this">
<view class="q-image-wrap imgs">
<!-- 图片缩略图 -->
<image class="q-image" src="{{item}}" mode="aspectFill" data-idx="{{index}}" bindtap="handleImagePreview"></image>
<!-- 移除图片的按钮 -->
<view class="q-image-remover delete" data-idx="{{index}}" bindtap="removeImage">删除</view>
</view>
</block>
</view>
</view>
<!-- <view>{{images}}</view> -->
<view class='btn_box'>
<button type="primary" bindtap="upload_info" class='upload_info'>提交表单</button>
</view>
</view>

@ -0,0 +1,265 @@
.box{
background-color: #efeff4;
height: 100%;
width: 100%;
}
.input-placeholder{
font-size: 16px;
}
.section{
width: 100%;
height: 55px;
box-sizing: border-box;
padding-top: 15px;
font-size: 16px;
display: flex;
}
.section input{
width: 90%;
margin: 0 auto;
border-radius: 6px;
background-color:#FFF;
height: 40px;
box-sizing: border-box;
padding-left: 45px;
background-repeat: no-repeat;
background-size: 26px 26px;
background-position: 10px 7px;
}
.sex_age_box{
display: flex;
justify-content: space-between;
box-sizing: border-box;
padding: 0 5%;
}
.section_sex{
width: 47.5%;
margin-top:15px;
background-color: #FFF;
height: 40px;
border-radius: 6px;
font-size: 16px;
color: #777777;
}
.imgs_sex{
width: 26px;
height: 26px;
display: inline-block;
margin: 7px 5% 0 4%;
}
.text_sex{
position: relative;
top: -7px;
}
.section_age{
width: 47.5%;
margin-top:15px;
font-size: 16px;
}
.section_age input{
width: 100%;
margin: 0 auto;
border-radius: 6px;
background-color:#FFF;
height: 40px;
box-sizing: border-box;
padding-left: 45px;
background-repeat: no-repeat;
background-size: 26px 26px;
background-position: 10px 7px;
}
.texta{
width: 90%;
margin: 0 auto;
border-radius: 6px;
background-color:#FFF;
height: 150px;
box-sizing: border-box;
padding-left: 20px;
padding-top: 10px;
}
.upload_img{
width: 90%;
margin: 0 auto;
background-color: #FFF;
margin-top: 15px;
border-radius: 6px;
}
.upload_img_btn{
width: 100%;
height: 60px;
line-height: 60px;
border-bottom:1px solid #dddddd;
display: flex;
justify-content: space-between;
}
.upload_img_btn text{
font-size: 17px;
color: #777777;
margin-left: 10px;
}
.btn{
height: 30px;
margin: 15px 15px 0 0;
}
.img_box{
box-sizing: border-box;
padding: 10px;
}
.imgs{
width: 47.5%;
height: 180px;
}
.imgs image{
width: 100%;
height: 150px;
}
.delete{
text-align: center;
font-size: 16px;
color: red;
height: 30px;
line-height: 30px;
}
.expert_choice{
width: 90%;
margin: 15px auto;
border-radius: 6px;
background-color: #FFF;
box-sizing: border-box;
padding: 0 15px 15px 15px;
font-size: 17px;
}
.msg{
color: #777777;
}
.choice_box{
display: flex;
flex-direction: column;
margin-top: 10px;
width: 100%;
background: linear-gradient(to right, #A4DFA5 , #86D78A ,#A4DFA5);
box-sizing: border-box;
padding: 15px;
color: #FFF;
border-radius: 6px;
text-align: center;
}
.choice_msg{
margin-top: 10px;
font-size: 13px;
color: #000;
}
.expert_checkbox{
margin-top: 20px;
font-size: 12px;
color: #777777;
}
.checkbox{
margin-bottom: 15px;
}
checkbox-group{
display: flex;
flex-direction: column;
}
checkbox .wx-checkbox-input{
border-radius: 50%;
height: 18px;
width: 18px;
margin-top: -4px;
}
/* 日期选择 */
.picker_group {
height: 85rpx;
line-height: 85rpx;
justify-content: center;
display: flex;
align-items: center;
font-size: 30rpx;
color: #888;
border-bottom: 1rpx solid #efefef;
}
.picker_group picker {
/* background-color: yellow; */
color: #64bff1;
height: 55rpx;
line-height: 55rpx;
margin: 0 2%;
padding: 0 2%;
border: 1rpx solid #64bff1;
border-radius: 30rpx;
}
.me_interval{
width: 90%;
margin: 0 auto;
background-color: #FFF;
border-radius: 6px;
box-sizing: border-box;
}
.me_interval text{
font-size: 17px;
color: #777777;
margin-left: 15px;
}
.picker_group{
margin-top: 10px;
padding-bottom: 10px;
border: none;
}
.picker_group picker{
padding: 0 5%;
}
.hospitalize{
width: 90%;
margin: 15px auto;
background-color: #FFF;
border-radius: 6px;
box-sizing: border-box;
}
.hospitalize text{
font-size: 17px;
color: #777777;
margin-left: 15px;
}
.radio-group{
margin-left: 15px;
font-size: 15px;
color: #777777;
display: flex;
flex-direction: column;
line-height: 35px;
}
.btn_box{
box-sizing: border-box;
padding: 20px 5% 50px;
}
.name_box{
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.name_box input{
width: 47.5%;
height: 30px;
border: 1px solid #DDD;
border-radius: 6px;
box-sizing: border-box;
padding-left: 15px;
}
.hedden{
display: none;
}
.show{
display: flex;
}
.title{
display: flex;
}
.shu{
width: 3px;
height: 26px;
background: #07afff;
margin: 17px 0 15px 17px;
}

@ -0,0 +1,133 @@
// pages/v9_manual/v9_manual.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list:[]
},
toinfo:function(abc){
// console.log(abc.currentTarget.dataset.abc)
console.log(abc)
app.globalData.no=abc.currentTarget.dataset.abc
// console.log(app.globalData.no)
wx.redirectTo({
url: '/pages/info/info',
})
},
// pulldata:function(){
// var that = this
// wx.request({
// url: 'http://127.0.0.1:2020/shengpi',
// method: 'GET',
// timeout: 0,
// dataType:JSON,
// success: (result) => {
// console.log(result.data)
// // JSON.parse将JSON字符串转换成一个JS对象然后利用python的调用语法对相关内容进行操作
// var p=JSON.parse(result.data)
// that.setData({
// list:p.test1
// })
// // var p=JSON.parse(result.data)
// wx.setStorageSync('test', p.test1[0])
// this.setData({
// name:this.data.name.concat(p.test1[0]),
// test:this.data.test.concat(wx.getStorageSync('test'))
// })
// },
// })
// },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
var that = this
wx.request({
url: 'http://127.0.0.1:2020/info',
method: 'GET',
timeout: 0,
dataType:JSON,
success: (result) => {
// console.log(result.data)
// console.log(result.data)
// JSON.parse将JSON字符串转换成一个JS对象然后利用python的调用语法对相关内容进行操作
var p=JSON.parse(result.data)
// console.log(p.test1)
// console.log(p.image)
// that.setData({
// list:p.test1
// })
// // var p=JSON.parse(result.data)
// wx.setStorageSync('test', p.test1[0])
this.setData({
list:p.test1,
// test:this.data.test.concat(wx.getStorageSync('test'))
})
},
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,18 @@
<!--pages/v9_manual/v9_manual.wxml-->
<!-- <view style="height: 100rpx;"></view> -->
<text>审批</text>
<!-- <view style="height: 100rpx;"></view>
<text>每次载入得到的人名信息如下</text> -->
<!-- <view bindtap="pulldata">点击刷新</view> -->
<!-- <view>{{name}}</view>
<view>{{test}}</view> -->
<view wx:for="{{list}}" bindtap="toinfo" data-abc="{{index}}" class="container">
<view class="item">
<!-- {{index}} -->
<text>{{item[2]}}</text>
<image src="/static/image/my-o.png" class="image1"></image>
<!-- <text>100</text> -->
</view>
</view>

@ -0,0 +1,13 @@
/* pages/v9_manual/v9_manual.wxss */
.item{
padding: 40rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.image1{
width: 50rpx;
height: 50rpx;
/* 如果要设置圆角的话 */
border-radius: 25rpx;
}
Loading…
Cancel
Save