|
@@ -94,6 +94,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {BasicFunction} from "../connector/basic-service";
|
|
|
import {
|
|
|
Uploader, Icon,
|
|
|
CellGroup, Field,
|
|
@@ -102,7 +103,7 @@
|
|
|
Button,
|
|
|
Actionsheet,
|
|
|
Toast
|
|
|
- } from 'vant'
|
|
|
+ } from 'vant';
|
|
|
import AddPhoto from "../components/addPhoto";
|
|
|
export default {
|
|
|
name: "SecurityVerify",
|
|
@@ -167,28 +168,44 @@
|
|
|
Toast.fail('请上传校卡正面照片');
|
|
|
return;
|
|
|
}
|
|
|
- let user = {
|
|
|
- phone: this.phone,
|
|
|
- password: this.password,
|
|
|
- nickname: this.username,
|
|
|
- gender: parseInt(this.radio),
|
|
|
- dormitory: this.dorId,
|
|
|
- photo: this.photo
|
|
|
- };
|
|
|
- console.log(user);
|
|
|
- // BasicFunction.get_data("ajaxregister?u=手机号&p=转义密码", 回调函数, {})
|
|
|
+
|
|
|
+ let success = true;
|
|
|
BasicFunction.get_data("ajaxregister?u=" + this.phone + '&p=' + this.password, function (response) {
|
|
|
console.log("------ Data Rcvd in Reg --------");
|
|
|
console.log(response);
|
|
|
- if(response.ret === "10000"){
|
|
|
+ if (response.ret !== "10000") {
|
|
|
// 不需要 设置 SessionID, 已经自动保存在jSessionID中
|
|
|
- this.$router.push('presentRegister');
|
|
|
- } else {
|
|
|
- // 注册失败的处理
|
|
|
Toast.fail("注册失败,请检查网络");
|
|
|
+ success = false;
|
|
|
+ } else {
|
|
|
+ localStorage.setItem("frontend-userid", response.model.userId);
|
|
|
}
|
|
|
}, {});
|
|
|
- // this.$router.push('presentRegister');
|
|
|
+ if (!success) return;
|
|
|
+
|
|
|
+ let userId = localStorage.getItem('frontend-userid');
|
|
|
+ let useridentity = [{
|
|
|
+ reviewId: "",
|
|
|
+ userId: userId,
|
|
|
+ dormDistrict: this.dorId,
|
|
|
+ userSex: parseInt(this.radio),
|
|
|
+ userSchoolCard: 201233222,
|
|
|
+ userReviewStatus: 0,
|
|
|
+ reviewerId: 1,
|
|
|
+ reviewerNote: "nmo",
|
|
|
+ reviewerNoteToUser: "noo"
|
|
|
+ }];
|
|
|
+ console.log(useridentity);
|
|
|
+ let that = this;
|
|
|
+ BasicFunction.get_data("smartIdentity/saveBatch", function (response) {
|
|
|
+ console.log(response);
|
|
|
+ if (response.ret === "10000") {
|
|
|
+ Toast.success("注册成功");
|
|
|
+ that.$router.push('presentRegister');
|
|
|
+ } else {
|
|
|
+ Toast.fail("注册失败,请检查网络");
|
|
|
+ }
|
|
|
+ }, useridentity);
|
|
|
},
|
|
|
onReadPhoto(file) {
|
|
|
this.photo = file;
|