Commit 1cedf6a1 authored by 5359's avatar 5359

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

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