Commit 1cedf6a1 authored by 5359's avatar 5359

增加用户注册校验和注册信息清除

parent 6fc060d8
Pipeline #6288 canceled with stages
......@@ -230,6 +230,13 @@
left: 50%;"
@click="next_step()"
>下一步</button>
<p/>
<button v-if="showStatus== 1"
@click="go_forword()"
class="next-step"
style="margin-top:20px"
>退出
</button>
</div>
<!-- 组织其他员工 -->
......@@ -421,6 +428,13 @@
</div>
</div>
<button class="next-step" @click="next_step_oth()">下一步</button>
<p/>
<button v-if="showStatus== 1"
@click="go_forword()"
class="next-step"
style="margin-top:20px"
>退出
</button>
</div>
</list-item>
</h-content>
......@@ -766,7 +780,8 @@ export default {
faceAuthStatus: "",
orgAuthStatus: "",
authAttachmentId: "",
authOrgAttachmentId: ""
authOrgAttachmentId: "",
showStatus: "",
};
},
......@@ -1190,6 +1205,27 @@ export default {
}
});
},
// 退出
go_forword() {
let vm = this;
let url = process.env.rootPath + "/accounts/outerAccounts/delete";
let param = {
openId: window.localStorage.openId
};
vm.hlsPopup.showLoading("请稍等");
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading();
if (res.code == 0) {
vm.$vux.toast.text(res.message, "middle");
window.open(
"http://lease.hitachics.com/www/#/UserRegister",
"_self"
);
} else {
vm.$vux.toast.text(res.message, "middle");
}
});
},
// 认证结果返回给接口
authResult(id, code, suc) {
let vm = this;
......@@ -1242,6 +1278,7 @@ export default {
vm.faceAuthStatus = data.faceAuthStatus;
vm.orgAuthStatus = data.orgAuthStatus;
vm.agentType = data.dealerFlag ? data.dealerFlag : "Y";
vm.showStatus = "1";
if (data.ctitype == 2) {
if (data.agentType == 1) {
//法定代表人
......
......@@ -8,7 +8,8 @@
style=" width: 150px;line-height: 30px;text-align: center;
border-radius: 5px;
background-color: #ddd;font-size:16px;font-weight:700;color:#11111187"
>个人信息</div>
>个人信息
</div>
</div>
<item style="border-bottom:1px solid #d0d0d0;font-size:12px">
<section slot="name" style="font-size:14px">
......@@ -69,7 +70,7 @@
ref="avatarInput"
class="uppic"
/>-->
<img :src="cardUp" alt class="pic" @click="addCardImage()" />
<img :src="cardUp" alt class="pic" @click="addCardImage()"/>
</div>
<!-- <div style="border:1px solid #b2b2b2;width:50%;border-radius:5px;position:relative;">
......@@ -92,7 +93,14 @@
<button
@click="next_step()"
style="width:120px;height:30px;border-radius:15px;background-color:#09bb07;color:#FFFFFF;margin:70px 0 0 -60px;position:relative;left:50%;"
>下一步</button>
>下一步
</button>
<p/>
<button v-if="showStatus== 1"
@click="go_forword()"
style="width:120px;height:30px;border-radius:15px;background-color:#09bb07;color:#FFFFFF;margin:20px 0 0 -60px;position:relative;left:50%;"
>退出
</button>
</list-item>
</h-content>
......@@ -102,7 +110,8 @@
<div
class="personalInf-text"
style=" width: 150px;line-height: 30px;text-align: center;border-radius: 5px;background-color: #ddd;font-size:16px;font-weight:700;color:#11111187"
>个人信息</div>
>个人信息
</div>
</div>
<item style="border-bottom:1px solid #d0d0d0">
<section slot="name" style="font-size:14px">
......@@ -162,7 +171,7 @@
class="uppic"
disabled
/>-->
<img :src="cardUp" alt class="pic" @click="previewImage()" />
<img :src="cardUp" alt class="pic" @click="previewImage()"/>
</div>
<!-- <div style="border:1px solid #b2b2b2;width:50%;border-radius:5px;position:relative;">
......@@ -185,15 +194,17 @@
<button
@click="logout()"
style="width:120px;height:30px;border-radius:15px;background-color:#09bb07;color:#FFFFFF;margin:70px 0 0 -60px;position:relative;left:50%;"
>注销</button>
>注销
</button>
</list-item>
</h-content>
</h-view>
</template>
<script>
import { getUrlParam } from "@/scripts/utils";
export default {
import {getUrlParam} from "@/scripts/utils";
export default {
data() {
return {
cardUp: require("../../../assets/userRegister/camear.png"), //身份证正面url
......@@ -205,16 +216,18 @@ export default {
phoneNumber1: "",
personName1: "",
status: "",
showStatus: "",
serverId: "",
preview_url: "", //图片预览地址
attchmentId: "" //附件预览id
};
},
components: {},
activated: function() {
activated: function () {
// this.getUserInfo();
},
updated: function() {},
updated: function () {
},
methods: {
// 调用微信接口的基础配置
wxConfig() {
......@@ -239,7 +252,7 @@ export default {
apiKey: "handexinxi",
url: clientUrl
};
hlsHttp.post(url, param).then(function(res) {
hlsHttp.post(url, param).then(function (res) {
wx.config({
beta: true,
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
......@@ -256,12 +269,12 @@ export default {
"hideOptionMenu"
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
wx.ready(function() {
wx.ready(function () {
wx.hideOptionMenu();
});
});
},
addCardImage: function() {
addCardImage: function () {
console.log("11111111");
let self = this;
// if(!self.cardUp){
......@@ -269,7 +282,7 @@ export default {
count: 1, //张数, 默认9
sizeType: ["compressed"], //建议压缩图
sourceType: ["album", "camera"], // 来源是相册、相机
success: function(res) {
success: function (res) {
self.cardUp = res.localIds[0];
self.uploadToWeixinServer(res.localIds[0]);
}
......@@ -292,7 +305,7 @@ export default {
wx.uploadImage({
localId: localId,
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
//res.serverId 返回图片的微信服务器端ID
console.log("上传图片后返回的信息", res);
self.serverId = res.serverId;
......@@ -311,7 +324,7 @@ export default {
fileName: new Date().getTime() + ".jpg"
};
vm.hlsPopup.showLoading("请稍等");
vm.$post(url, param).then(function(res) {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading();
vm.personName = res["姓名"];
vm.identificationNumber = res["公民身份号码"];
......@@ -353,7 +366,7 @@ export default {
"http://lease.hitachics.com/www/#/UserRegister/PersonalRegister?Regstatus=1"
};
vm.hlsPopup.showLoading("请稍等");
vm.$post(url, param).then(function(res) {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading();
if (res.code == 0) {
vm.$vux.toast.text(res.message, "middle");
......@@ -395,7 +408,7 @@ export default {
success: suc
};
vm.hlsPopup.showLoading("请稍等");
vm.$post(url, param).then(function(res) {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading();
});
},
......@@ -405,14 +418,14 @@ export default {
hlsPopup.showConfirm({
title: "签名成功",
content: "请确认合同是否都已下载完成,注销后无法下载,请知悉,谢谢!",
onConfirm: function(index) {
onConfirm: function (index) {
if (index === 1) {
let url = process.env.rootPath + "/accounts/outerAccounts/delete";
let param = {
openId: window.localStorage.openId
};
vm.hlsPopup.showLoading("请稍等");
vm.$post(url, param).then(function(res) {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading();
if (res.code == 0) {
vm.$vux.toast.text(res.message, "middle");
......@@ -428,9 +441,30 @@ export default {
}
});
},
// 退出
go_forword() {
let vm = this;
let url = process.env.rootPath + "/accounts/outerAccounts/delete";
let param = {
openId: window.localStorage.openId
};
vm.hlsPopup.showLoading("请稍等");
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading();
if (res.code == 0) {
vm.$vux.toast.text(res.message, "middle");
window.open(
"http://lease.hitachics.com/www/#/UserRegister",
"_self"
);
} else {
vm.$vux.toast.text(res.message, "middle");
}
});
},
// 键盘消失,页面回到顶部
goTop() {
setTimeout(function() {
setTimeout(function () {
var scrollHeight =
document.documentElement.scrollTop || document.body.scrollTop || 0;
console.log(scrollHeight);
......@@ -453,7 +487,7 @@ export default {
"/sign/info/hclc/query/by/openid?openId=" +
window.localStorage.openId;
vm.hlsPopup.showLoading("请稍等");
vm.$post(url).then(function(res) {
vm.$post(url).then(function (res) {
vm.hlsPopup.hideLoading();
if (res.rows) {
if (res.rows.length > 0) {
......@@ -470,6 +504,7 @@ export default {
// vm.identificationNumber = '22222222222222222';
// vm.phoneNumber = '18230982828';
// vm.personName = 'chaiwei';
vm.showStatus = "1";
}
}
});
......@@ -482,12 +517,12 @@ export default {
// var data = this.$route.params.userInfo;
this.getUserInfo();
}
};
};
</script>
<style lang="less" type="text/less" scoped>
@import "../../../styles/vue-1px.less";
@import "../../../styles/vue-1px.less";
.personalRegister {
.personalRegister {
font-size: 12px !important;
.personalInfo {
width: 100%;
......@@ -506,23 +541,23 @@ export default {
height: 100%;
position: absolute;
}
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#home {
}
}
}
}
// iPhoneX Max适配
@media (device-width: 414px) and (device-height: 896px) {
// iPhoneX Max适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
.platform-ios {
#home {
}
}
}
}
}
</style>
......@@ -40,7 +40,7 @@ export default {
isClick2: false,
isHighLight: true,
isHighLight1: true,
isReadOnlyPersonal: true,
isReadOnlyPersonal: false,
isReadOnlyCompany: false,
userInfo: null,
userInfo1: null,
......
......@@ -62,10 +62,10 @@
</template>
<script>
import functionState from "./functionState";
import { getUrlParam } from "@/scripts/utils";
import functionState from "./functionState";
import {getUrlParam} from "@/scripts/utils";
export default {
export default {
data() {
return {
imgList: [],
......@@ -80,8 +80,9 @@ export default {
subscribe: false
};
},
beforeCreate: function() {},
created: function() {
beforeCreate: function () {
},
created: function () {
// debugger;
// window.localStorage.setItem('user_id', 2009)
// this.imgList = [...functionState.bannerList]
......@@ -106,7 +107,8 @@ export default {
this.subscribe = window.localStorage.subscribe;
});
},
updated: function() {},
updated: function () {
},
methods: {
// 调用微信接口的基础配置
wxConfig() {
......@@ -130,7 +132,7 @@ export default {
apiKey: "handexinxi",
url: clientUrl
};
hlsHttp.post(url, param).then(function(res) {
hlsHttp.post(url, param).then(function (res) {
wx.config({
beta: true,
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
......@@ -147,7 +149,7 @@ export default {
"hideOptionMenu"
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
wx.ready(function() {
wx.ready(function () {
wx.hideOptionMenu();
});
});
......@@ -184,21 +186,36 @@ export default {
let vm = this;
let url = process.env.loginPathRl + "admin";
let param = {};
return vm.hlsHttp.post(url, param).then(function(res) {
return vm.hlsHttp.post(url, param).then(function (res) {
window.localStorage.setItem("access_token_rl", res.access_token);
});
},
goFunctionHome(data) {
if (this.subscribe) {
this.$router.push({
name: data.functionState
});
} else {
// if (this.subscribe) {
// this.$router.push({
// name: data.functionState
// });
// } else {
// hlsPopup.showPopup({
// title: "提示",
// content: "未关注公众号,请先关注后再进入!",
// onConfirm() {}
// });
// }
if (!this.subscribe) {
hlsPopup.showPopup({
title: "提示",
content: "未关注公众号,请先关注后再进入!",
onConfirm() {}
});
content: "未关注公众号,请先关注后再进入!",
onConfirm: function () {
}
})
} else {
"Y" == window.localStorage.authFlag || "UserRegister" == data.functionState ? this.$router.push({name: data.functionState}) : hlsPopup.showPopup({
title: "提示",
content: "当前用户未完成注册,请先注册!",
onConfirm: function () {
}
})
}
},
// moreRecommend () {
......@@ -211,13 +228,14 @@ export default {
apiKey: "handexinxi",
code: code
};
// window.localStorage.openId = "oBdoRwI9gj9Brbe9iqlDCg5G2dDc";
// window.localStorage.openId = "oBdoRwP0WSbegPOoe9WTEMPkKsWQ";
// vm.getWxUserInfo(window.localStorage.openId);
vm.hlsHttp.post(url, param).then(function(res) {
vm.hlsHttp.post(url, param).then(function (res) {
if (res.resultCode == "00") {
window.localStorage.openId = res.result;
if (window.localStorage.openId) {
vm.getWxUserInfo(window.localStorage.openId);
vm.getUserInfo(window.localStorage.openId)
}
}
});
......@@ -232,20 +250,30 @@ export default {
};
// window.localStorage.openId = "1234567"
vm.hlsHttp.post(url, params).then(function(res) {
vm.hlsHttp.post(url, params).then(function (res) {
if (res.resultCode == "00") {
vm.subscribe = window.localStorage.subscribe = res.result.subscribe;
// console.log("vvvv", res.result.subscribe);
}
});
},
getUserInfo: function (openId) {
let vm = this,
url = process.env.rootPath + "/sign/info/hclc/query/by/openid?openId=" + openId;
vm.$post(url).then(function (res) {
if (res.rows.length > 0) {
var results = res.rows[0];
vm.authFlag = window.localStorage.authFlag = results.authFlag;
}
})
}
}
};
};
</script>
<style lang="less" scoped type="text/less">
@import "../styles/vue-1px";
@import "../styles/vue-1px";
#home {
#home {
.top-box {
// height: 264px;
width: 100%;
......@@ -472,5 +500,5 @@ export default {
}
}
}
}
}
</style>
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