Commit 31ac18b2 authored by ‘yangmengxue’'s avatar ‘yangmengxue’

电子邮箱

parent 4397589f
......@@ -9,6 +9,7 @@
"version": "0.1.0",
"dependencies": {
"axios": "^0.21.4",
"caniuse-lite": "^1.0.30001617",
"core-js": "^3.6.5",
"cos-js-sdk-v5": "^1.4.20",
"default-passive-events": "^2.0.0",
......@@ -4453,21 +4454,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001260",
"integrity": "sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==",
"dev": true,
"dependencies": {
"nanocolors": "^0.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
}
},
"node_modules/caniuse-lite/node_modules/nanocolors": {
"version": "0.1.12",
"integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ==",
"dev": true
"version": "1.0.30001617",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz",
"integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA=="
},
"node_modules/case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",
......@@ -18787,19 +18776,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001260",
"integrity": "sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==",
"dev": true,
"requires": {
"nanocolors": "^0.1.0"
},
"dependencies": {
"nanocolors": {
"version": "0.1.12",
"integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ==",
"dev": true
}
}
"version": "1.0.30001617",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz",
"integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA=="
},
"case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",
......
......@@ -9,6 +9,7 @@
},
"dependencies": {
"axios": "^0.21.4",
"caniuse-lite": "^1.0.30001617",
"core-js": "^3.6.5",
"cos-js-sdk-v5": "^1.4.20",
"default-passive-events": "^2.0.0",
......
......@@ -156,7 +156,6 @@
ref="id_card"
size="small"
v-model="referForm.id_card"
/>
</el-form-item>
</el-col>
......@@ -497,7 +496,6 @@
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- 选科情况 -->
......@@ -530,7 +528,10 @@
</el-form-item>
</el-col>
<!--已选科-->
<el-col :span="12" v-if="configJson.electSubjectSituation == 1&& showSubject == 1">
<el-col
:span="12"
v-if="configJson.electSubjectSituation == 1 && showSubject == 1"
>
<el-form-item
:rules="
showSubject == 1
......@@ -564,7 +565,8 @@
<el-col :span="12" v-show="configJson.pastMedicalHistory == 1">
<el-form-item
:rules="
(configJson.pastMedicalHistory == 1?true:false)&&isOffline==true
(configJson.pastMedicalHistory == 1 ? true : false) &&
isOffline == true
? referInfoRules.pastMedicalHistory
: [{ required: false }]
"
......@@ -585,7 +587,7 @@
<el-col :span="12" v-show="configJson.noteOther == 1">
<el-form-item
:rules="
(configJson.noteOther == 1?true:false)&&isOffline==true
(configJson.noteOther == 1 ? true : false) && isOffline == true
? referInfoRules.noteOther
: [{ required: false }]
"
......@@ -606,7 +608,7 @@
<el-col :span="12" v-show="configJson.clothesSize == 1">
<el-form-item
:rules="
(configJson.clothesSize == 1?true:false)&&isOffline==true
(configJson.clothesSize == 1 ? true : false) && isOffline == true
? referInfoRules.clothesSize
: [{ required: false }]
"
......@@ -633,12 +635,7 @@
</el-col>
<!-- 邀请码 -->
<el-col :span="12" v-show="configJson.code == 1">
<el-form-item
label="邀请码"
prop="code"
style="height: 73px"
>
<el-form-item label="邀请码" prop="code" style="height: 73px">
<el-input
:disabled="isCode"
clearable
......@@ -648,9 +645,7 @@
v-model="referForm.code"
/>
</el-form-item>
<div class="tipsMsg">
每个邀请码仅能绑定一个用户
</div>
<div class="tipsMsg">每个邀请码仅能绑定一个用户</div>
</el-col>
<!-- 自我介绍 -->
<el-col :span="12" v-show="configJson.introduceMyself == 1">
......@@ -662,7 +657,7 @@
"
label="自我介绍"
prop="introduce"
style="height:100%"
style="height: 100%"
>
<el-input
:rows="6"
......@@ -673,7 +668,8 @@
show-word-limit
size="small"
type="textarea"
v-model="referForm.introduce"/>
v-model="referForm.introduce"
/>
</el-form-item>
<div class="tipsMsg">
用清晰、简洁的语言介绍自己对科学和创新的兴趣、经验和动机,以及为什么希望参加“强国有我”复旦大学信息科学与工程学院青少年科学营
......@@ -702,12 +698,7 @@
</el-col>
</el-row>
<!-- 紧急联系人-->
<div
v-show="
configJson.emergency == 1 ||
configJson.emergencyPhone == 1
"
>
<div v-show="configJson.emergency == 1 || configJson.emergencyPhone == 1">
<div class="cont_title">紧急联系人</div>
<el-row :gutter="20">
<!-- 紧急联系人 -->
......@@ -929,7 +920,6 @@
list-type="picture-card"
name="multipartFile"
ref="imgUrl"
>
<i class="el-icon-circle-plus" style="font-size: 44px"> </i>
<!-- <div class="text">上传材料</div> -->
......@@ -968,7 +958,7 @@
</div>
<el-dialog :visible.sync="dialogVisible">
<img :src="resultPicture" alt="" width="100%"/>
<img :src="resultPicture" alt="" width="100%" />
</el-dialog>
</div>
</el-form-item>
......@@ -984,18 +974,24 @@
</template>
<script>
/* eslint-disable */
import {delPic, getAccount, getProAndCity, getSchool, setAccount} from "r/index/signUp";
import COS from "cos-js-sdk-v5";
import {achievementCallBack, cosSignature} from "r/index/cosUpload";
import validator from "common/validator";
import area from "config/area";
import cueDialog from "c/index/cueDialog";
/* eslint-disable */
import {
delPic,
getAccount,
getProAndCity,
getSchool,
setAccount,
} from "r/index/signUp";
import COS from "cos-js-sdk-v5";
import { achievementCallBack, cosSignature } from "r/index/cosUpload";
import validator from "common/validator";
import area from "config/area";
import cueDialog from "c/index/cueDialog";
export default {
export default {
name: "referInfo",
props: {invitation_code: String},
components: {cueDialog},
props: { invitation_code: String },
components: { cueDialog },
data() {
const validateContent = (rule, value, callback) => {
if (!this.referForm.birthday) {
......@@ -1024,8 +1020,8 @@
configJson: {},
isUploading: false, // 图片上传蒙层
isCode: false, // 邀请码是否禁用
showSubject: 0,//是否展示选科(多选)
subjectState: '',
showSubject: 0, //是否展示选科(多选)
subjectState: "",
elect_subject_situation: null,
referForm: {
name: null,
......@@ -1059,20 +1055,20 @@
school: null,
school_contacts: null,
school_phone: null,
code: null
code: null,
},
// doubt_code: window.localStorage.getItem(
// "doubt_code" + this.$store.state.indexIdentity
// ),//是否填写邀请码
schoolName: {},
referInfoRules: {
name: [{required: true, message: "姓名不能为空!", trigger: "blur"}],
name: [{ required: true, message: "姓名不能为空!", trigger: "blur" }],
gender: [
{required: true, message: "性别不能为空!", trigger: "change"},
{ required: true, message: "性别不能为空!", trigger: "change" },
],
id_card: [
// { required: true, message: "身份证号不能为空!", trigger: "blur" },
{validator: validator.validateid_card, trigger: "blur"},
{ validator: validator.validateid_card, trigger: "blur" },
],
birthday: [
{
......@@ -1082,11 +1078,11 @@
},
],
jiguan_code: [
{required: true, validator: validateContents, trigger: "change"},
{ required: true, validator: validateContents, trigger: "change" },
],
nation: [
{required: true, message: "民族不能为空!", trigger: "change"},
{ required: true, message: "民族不能为空!", trigger: "change" },
],
country: [
{
......@@ -1103,21 +1099,21 @@
},
],
political_status: [
{required: true, message: "政治面貌不能为空!", trigger: "blur"},
{ required: true, message: "政治面貌不能为空!", trigger: "blur" },
],
email: [
{required: true, message: "电子邮箱不能为空!", trigger: "blur"},
{validator: validator.validateEmail, trigger: "blur"},
{ required: true, message: "电子邮箱不能为空!", trigger: "blur" },
{ validator: validator.validateEmail, trigger: "blur" },
],
grade: [
{required: true, message: "在读年级不能为空!", trigger: "blur"},
{ required: true, message: "在读年级不能为空!", trigger: "blur" },
],
age: [
{required: true, message: "年龄不能为空!", trigger: "blur"},
{validator: validator.validateNumber, trigger: "blur"},
{ required: true, message: "年龄不能为空!", trigger: "blur" },
{ validator: validator.validateNumber, trigger: "blur" },
],
education: [
{required: true, message: "学历不能为空!", trigger: "change"},
{ required: true, message: "学历不能为空!", trigger: "change" },
],
idCard: [
{
......@@ -1125,8 +1121,7 @@
message: "身份证号不能为空!",
trigger: "blur",
},
{validator: validator.validateid_card, trigger: "blur"},
{ validator: validator.validateid_card, trigger: "blur" },
],
// address: [
// { required: true, message: "详细地址不能为空!", trigger: "blur" },
......@@ -1151,7 +1146,7 @@
message: "手机号不能为空!",
trigger: "blur",
},
{validator: validator.validatePhone, trigger: "blur"},
{ validator: validator.validatePhone, trigger: "blur" },
],
chooseSubject: [
{
......@@ -1194,7 +1189,7 @@
message: "紧急联系人电话不能为空!",
trigger: "blur",
},
{validator: validator.validatePhone, trigger: "blur"},
{ validator: validator.validatePhone, trigger: "blur" },
],
clothesSize: [
{
......@@ -1225,10 +1220,10 @@
},
],
school: [
{required: true, message: "请选择所在学校!", trigger: "change"},
{ required: true, message: "请选择所在学校!", trigger: "change" },
],
school_contacts: [
{required: true, message: "请填写中学联系人!", trigger: "blur"},
{ required: true, message: "请填写中学联系人!", trigger: "blur" },
],
school_phone: [
{
......@@ -1236,7 +1231,7 @@
message: "中学联系人电话(手机)不能为空!",
trigger: "blur",
},
{validator: validator.validatePhone, trigger: "blur"},
{ validator: validator.validatePhone, trigger: "blur" },
],
// backgroundPicture: [{ required: true, message: "请上传图片" }],
},
......@@ -1248,8 +1243,8 @@
selectSchoolList: [], //就读中学-中学列表
jgProvinceCode: "", //省份id
jiguan_city: "", //城市id(和省份id拼接)
electSubjectArrs: ["未选科", "已选科", "文科", '理科'],
SubjectArrs: ["物理", "历史", "化学", "地理", "生物", "政治",],
electSubjectArrs: ["未选科", "已选科", "文科", "理科"],
SubjectArrs: ["物理", "历史", "化学", "地理", "生物", "政治"],
EducationArrs: ["初中", "高中", "大学", "硕士", "博士"],
yearArrs: [], //生日涉及的近10年的年份
monthArrs: [
......@@ -1362,7 +1357,6 @@
id: 13,
name: "群众",
},
],
//衣服尺码
clothesSize: [
......@@ -1394,7 +1388,6 @@
id: 7,
name: "XXXXL",
},
],
// 中学(模糊搜索)
// timeout: null,
......@@ -1406,7 +1399,7 @@
resultPicture: "",
disabled: false, //限制输入框
isOffline: false, //活动形式是否包含线下字段
hideUpload: false
hideUpload: false,
};
},
created() {
......@@ -1427,19 +1420,18 @@
if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) {
this.getProAndCity();
}
;
//若线下形式(既往病史或过敏史,备注或其它,衣服尺码)为必填项,否则为选填。
let multiform = JSON.parse(window.localStorage.getItem("multiform" + code));
let multiform_id = window.localStorage.getItem("multiform_id" + code);
if (multiform != '[]') {
if (multiform != "[]") {
multiform.forEach((i) => {
if (i.id == multiform_id) {
let reg = /[\u7ebf][\u4e0b]/
this.isOffline = reg.test(i.multiform_name)
let reg = /[\u7ebf][\u4e0b]/;
this.isOffline = reg.test(i.multiform_name);
}
})
});
}
console.log(this.isOffline)
console.log(this.isOffline);
},
watch: {
referForm(val) {
......@@ -1490,20 +1482,25 @@
this.changeCity(this.referForm.school_city, true);
}
if (val.elect_subject_situation == '文科' || val.elect_subject_situation == '理科') {
if (
val.elect_subject_situation == "文科" ||
val.elect_subject_situation == "理科"
) {
this.referForm.subjectState = val.elect_subject_situation;
this.showSubject = 0;
} else if (val.elect_subject_situation != null &&
val.elect_subject_situation !== '' &&
val.elect_subject_situation !== '-') {
this.referForm.subjectState = '已选科';
} else if (
val.elect_subject_situation != null &&
val.elect_subject_situation !== "" &&
val.elect_subject_situation !== "-"
) {
this.referForm.subjectState = "已选科";
this.showSubject = 1;
this.referForm.chooseSubject = val.elect_subject_situation.split('#');
this.referForm.chooseSubject = val.elect_subject_situation.split("#");
this.elect_subject_situation = val.elect_subject_situation;
} else {
this.referForm.subjectState = '未选科';
this.referForm.subjectState = "未选科";
this.showSubject = 0;
this.elect_subject_situation = '-';
this.elect_subject_situation = "-";
this.referForm.chooseSubject = [];
}
if (this.invitation_code != null) {
......@@ -1511,14 +1508,13 @@
this.isCode = true;
}
//自我介绍
let introduce = this.$store.state.signUpInfo.introduce
let introduce = this.$store.state.signUpInfo.introduce;
if (introduce != null) {
this.referForm.introduce = introduce
this.referForm.introduce = introduce;
}
},
},
mounted() {
},
mounted() {},
methods: {
// 页面信息个人获取
getAccount() {
......@@ -1528,7 +1524,7 @@
return this.$message.error(res.data.msg);
}
let info = res.data.info;
info['code'] = null
info["code"] = null;
let referForm = {
name: null,
gender: null,
......@@ -1561,8 +1557,8 @@
school: null,
school_contacts: null,
school_phone: null,
code: null
}
code: null,
};
for (let k in info) {
referForm[k] = info[k];
}
......@@ -1572,8 +1568,15 @@
res.data.info.jiguan_province.toString() +
res.data.info.jiguan_city.toString();
}
console.log(typeof window.localStorage.getItem("index-email-all"));
if (res.data.info.email == null) {
this.referForm.email = window.localStorage.getItem("index-email-all"); //本地取用户邮箱
let email = window.localStorage.getItem("index-email-all");
if (email == 'null') {
this.referForm.email = null
} else {
this.referForm.email =
window.localStorage.getItem("index-email-all"); //本地取用户邮箱
}
}
});
},
......@@ -1608,20 +1611,20 @@
// 选科情况
changeSubjectState(val) {
// this.referForm.subjectState = val
if (val == '已选科') {
this.referForm.subjectState = val
if (val == "已选科") {
this.referForm.subjectState = val;
this.showSubject = 1;
this.elect_subject_situation = '';
this.elect_subject_situation = "";
// console.log(this.elect_subject_situation)
} else if (val == '未选科') {
this.showSubject = 0
this.referForm.subjectState = val
this.elect_subject_situation = '-'
} else if (val == "未选科") {
this.showSubject = 0;
this.referForm.subjectState = val;
this.elect_subject_situation = "-";
// console.log(this.referForm.subjectState)
} else {
//文科理科
this.elect_subject_situation = val
this.showSubject = 0
this.elect_subject_situation = val;
this.showSubject = 0;
}
},
changeSubjectList(val) {
......@@ -1631,7 +1634,7 @@
},
//自我介绍
changeIntroduce(val) {
this.referForm.introduce = val
this.referForm.introduce = val;
},
// 获取省份城市
getProAndCity() {
......@@ -1754,7 +1757,8 @@
this.schoolName = res.data.school_list;
// console.log( this.schoolName)
let code = this.$store.state.indexIdentity;
window.localStorage.setItem("schoolName" + code,
window.localStorage.setItem(
"schoolName" + code,
JSON.stringify(res.data.list)
);
for (let key in this.schoolName) {
......@@ -1827,27 +1831,31 @@
},
// cos上传
async getCosConfigs(image, file) {
console.log(file)
console.log(file);
this.loading = true;
await cosSignature({image: image, index: '1'})
await cosSignature({ image: image, index: "1" })
.then((res) => {
console.log(res, "开始上传图片");
let resData = res.data.data
let resData = res.data.data;
if (res.data.code === 200) {
const cos = new COS({
// 必选参数
getAuthorization: (options, callback) => {
callback({
TmpSecretId: resData.credentials.credential.credentials.tmpSecretId,
TmpSecretKey: resData.credentials.credential.credentials.tmpSecretKey,
XCosSecurityToken: resData.credentials.credential.credentials.sessionToken,
TmpSecretId:
resData.credentials.credential.credentials.tmpSecretId,
TmpSecretKey:
resData.credentials.credential.credentials.tmpSecretKey,
XCosSecurityToken:
resData.credentials.credential.credentials.sessionToken,
StartTime: resData.credentials.credential.startTime, // 时间戳,单位秒,如:1580000000
ExpiredTime: resData.credentials.credential.expiredTime, // 时间戳,单位秒,如:1580000900
});
},
});
console.log(resData)
cos.putObject({
console.log(resData);
cos.putObject(
{
Bucket: resData.credentials.bucket,
Region: resData.credentials.region,
Key: resData.key,
......@@ -1861,10 +1869,10 @@
if (err) {
console.log(err);
this.loading = false;
this.$message.error('上传失败!')
this.$message.error("上传失败!");
} else {
console.log(data);
this.signUploadSuccess('http://' + data.Location, resData);
this.signUploadSuccess("http://" + data.Location, resData);
}
}
);
......@@ -1879,13 +1887,14 @@
},
// cos上传-告诉后端上传成功
async signUploadSuccess(path, resData) {
await achievementCallBack({key: resData.key, index: 1}).then(res => {
await achievementCallBack({ key: resData.key, index: 1 })
.then((res) => {
if (res.data.code != 200) {
this.loading = false;
return this.$message.error('上传失败!');
return this.$message.error("上传失败!");
}
this.loading = false;
this.$message.success('上传成功!');
this.$message.success("上传成功!");
this.resultPicture = path + "?t=" + Date.parse(new Date());
this.$forceUpdate();
let obj = {
......@@ -1893,16 +1902,17 @@
};
this.fileList.push(obj);
let code = this.$store.state.indexIdentity;
window.localStorage.setItem("sign_up_file_" +
window.localStorage.setItem(
"sign_up_file_" +
+window.localStorage.getItem("index-phone-all") +
code,
JSON.stringify(this.fileList)
);
this.ChangeImage(this.fileList)
}).catch(err => {
this.loading = false;
this.ChangeImage(this.fileList);
})
.catch((err) => {
this.loading = false;
});
},
// async getOssConfigs(image, file) {
// let obj = {
......@@ -1974,8 +1984,8 @@
let str = getfile.split(
"https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/"
); //https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/进行分割,
let savefile = str[1].split('?')[0];
delPic({object: savefile}).then((res) => {
let savefile = str[1].split("?")[0];
delPic({ object: savefile }).then((res) => {
// console.log(res, "delpic");
if (res.data.code != 200) {
return this.$message.error(res.data.msg);
......@@ -1985,14 +1995,15 @@
if (item.url == file.url) {
this.fileList.splice(idx, 1);
let code = this.$store.state.indexIdentity;
window.localStorage.setItem("sign_up_file_" +
window.localStorage.setItem(
"sign_up_file_" +
window.localStorage.getItem("index-phone-all") +
code,
JSON.stringify(this.fileList)
);
}
});
this.ChangeImage(this.fileList)
this.ChangeImage(this.fileList);
this.$message.success(res.data.msg);
});
})
......@@ -2135,9 +2146,9 @@
if (_this.configJson.code == 1) {
obj.code = _this.referForm.code;
}
console.log(obj)
console.log(obj);
setAccount(obj).then((res) => {
console.log(res)
console.log(res);
if (res.data.code != 200) {
if (res.data.code == 400068) {
_this.$parent.statuss();
......@@ -2147,21 +2158,20 @@
}
if (res.data.code == 4000346 || res.data.code == 4000347) {
_this.dialogVisible = true;
_this.msg = res.data.msg
_this.msg = res.data.msg;
return;
}
_this.$emit("getstatus", res.data.status);
_this.$message.success(res.data.msg);
// _this.referForm = res.data.data;
});
});
},
},
};
};
</script>
<style lang="scss" scoped>
@import "a/scss/btn";
@import "a/scss/SignUp/referInfo";
@import "a/scss/btn";
@import "a/scss/SignUp/referInfo";
</style>
......@@ -22,11 +22,11 @@
// export const SERVER_WS_URL = "wss://tgwapi.campcenter.cn"; // websocket
// 正式
// export const SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; //开发环境
// export const SERVER_WS_URL = "wss://gwapi.campcenter.cn"; // websocket
export const SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; //开发环境
export const SERVER_WS_URL = "wss://gwapi.campcenter.cn"; // websocket
// 测试
export const SERVER_URL = "http:// 8088/modules-campsite"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "http://43.143.166.79:8088/modules-campsite"; //开发环境
export const SERVER_WS_URL = "wss://43.143.166.79:8088"; // websocket
// export const SERVER_URL = "http:// 8088/modules-campsite"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "http://43.143.166.79:8088/modules-campsite"; //开发环境
// export const SERVER_WS_URL = "wss://43.143.166.79:8088"; // websocket
......@@ -350,7 +350,7 @@
.title_top {
display: flex;
justify-content: end;
justify-content: flex-end;
}
.normal {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment