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

电子邮箱

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