提交 4768d314 编写于 作者: 张敬贤's avatar 张敬贤

add

上级 cf121fb2
......@@ -35,3 +35,38 @@ export const getPubKey = (param) => {
},
});
};
// /tis/insurance / login
export const insuranceLogin = (data) => {
return request({
method: 'post',
url: '/tis/insurance/login',
data: data,
withCredentials: true,
});
};
// / 获取type=的协议名称
export const getProtocolContentByType = (type) => {
return request({
method: 'get',
url: `/smartcontract/protocol/content?type=${type}`,
withCredentials: true,
});
};
// 获取type=的协议内容
export const getProtocolNameByType = (type) => {
return request({
method: 'get',
url: `/smartcontract/protocol/name?type=${type}`,
withCredentials: true,
});
};
//
export const getPrototypes = (projectEquityNo) => {
return request({
method: 'get',
url: `tis/insurance/prototypes?projectEquityNo=${projectEquityNo}`,
withCredentials: true,
});
};
此差异已折叠。
......@@ -25,65 +25,46 @@ export default {
})
},
mounted() {
const _this = this;
const imgScode = $('#imgScode');
console.log(imgScode);
$('#imgScode').imgcode({
frontimg: 'data:image/png;base64,' + _this.imgCodeData.slidingImage,
backimg: 'data:image/png;base64,' + _this.imgCodeData.backImage,
yHeight: _this.imgCodeData.yHeight,
refreshcallback: function () {
// 刷新验证码
console.log('refreshcallback');
_this.refreshImg(undefined);
},
closecallback: function () {
// 关闭弹框
console.log('closecallback');
_this.$emit('closeSlideCheckpageDialog');
},
callback: function (msg) {
console.log('callback');
const $this = this;
_this.getMsgCode($this, msg, _this.imgCodeData, undefined);
}
});
console.log(this.imgCodeData);
// const {slidingImage, backImage, yHeight} = this.imgCodeData;
this.initImgCode(this.imgCodeData);
},
methods: {
...mapActions('home', ['setNeedTimer']),
getImg(type) {
//
const _this = this;
const data = {
mobile: this.mobile,
jigsawVersion: 'v1'
};
sendEncryptRequest(data, params => {
checkNeedImgCode(params).then(res => {
// eslint-disable-next-line
$('#imgScode').imgcode({
frontimg: 'data:image/png;base64,' + res.data.slidingImage,
backimg: 'data:image/png;base64,' + res.data.backImage,
yHeight: res.data.yHeight,
this.initImgCode(res.data, type);
});
});
},
initImgCode(data, type) {
const _this = this;
$('#imgScode').imgcode({
frontimg: 'data:image/png;base64,' + data.slidingImage,
backimg: 'data:image/png;base64,' + data.backImage,
yHeight:data.yHeight,
refreshcallback: function () {
// 刷新验证码
_this.refreshImg(type);
_this.getImg(type);
},
closecallback: function () {
// 关闭弹框
_this.$emit('closeSlideCheckpageDialog');
},
callback: function (msg) {
const $this = this;
_this.getMsgCode($this, msg, res.data, type);
_this.getMsgCode(_this, msg, data, type);
}
});
});
});
},
refreshImg(type) {
const _this = this;
// const _this = this;
const data = {
mobile: this.mobile,
jigsawVersion: 'v1'
......@@ -91,23 +72,24 @@ export default {
sendEncryptRequest(data, params => {
checkNeedImgCode(params).then(res => {
// eslint-disable-next-line
$('#imgScode').imgcode({
frontimg: 'data:image/png;base64,' + res.data.slidingImage,
backimg: 'data:image/png;base64,' + res.data.backImage,
yHeight: res.data.yHeight,
refreshcallback: function () {
// 刷新验证码
_this.getImg(type);
},
closecallback: function () {
// 关闭弹框
_this.$emit('closeSlideCheckpageDialog');
},
callback: function (msg) {
const $this = this;
_this.getMsgCode($this, msg, res.data, type);
}
});
this.initImgCode(res.data, type);
// $('#imgScode').imgcode({
// frontimg: 'data:image/png;base64,' + res.data.slidingImage,
// backimg: 'data:image/png;base64,' + res.data.backImage,
// yHeight: res.data.yHeight,
// refreshcallback: function () {
// // 刷新验证码
// _this.getImg(type);
// },
// closecallback: function () {
// // 关闭弹框
// _this.$emit('closeSlideCheckpageDialog');
// },
// callback: function (msg) {
// const $this = this;
// _this.getMsgCode($this, msg, res.data, type);
// }
// });
});
});
},
......
......@@ -126,6 +126,11 @@ const routerConfig = [
name: 'login',
component: () => import('@/views/login/index.vue'),
},
{
path: '/protocol',
name: 'protocol',
component: () => import('@/views/login/protocol.vue'),
},
];
router.beforeEach(async (to, from, next) => {
headerConfigByMeta(to);
......
此差异已折叠。
<template>
<div class="protocol">
<div class="protocol-name">
{{ name }}
</div>
<div
class="protocol-content"
v-html="content"
/>
</div>
</template>
<script>
import { getProtocolContentByType, getProtocolNameByType} from '@/api/login';
export default {
data() {
return {
name: '',
content: '',
title:''
};
},
mounted() {
const { type } = this.$route.query;
this.title = type == 5 ? '云鹊隐私声明' : '云鹊健康用户协议';
document.querySelector('title').innerHTML = this.title;
this.getProtocolNameByType(type);
this.getProtocolContentByType(type);
},
methods: {
getProtocolContentByType(type) {
getProtocolContentByType(type).then(res => {
console.log(res);
this.content = res.data;
console.log('1 ', this.content);
});
},
getProtocolNameByType(type) {
getProtocolNameByType(type).then(res => {
console.log(res);
this.name = res.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.protocol{
height: 100vh;
overflow: auto;
background: #fff;
}
.protocol-name{
height: 20px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #02120F;
line-height: 20px;
text-align: center;
margin: 15px 0;
}
.protocol-content{
font-size: 15px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #02120F;
line-height: 23px;
width: 345px;
margin: 0 auto 50px auto;
}
</style>
......@@ -36,7 +36,7 @@ module.exports = {
port: 8083,
proxy: {
'/proxy': {
target: 'https://test1-sc.yunqueyi.com/',
target: 'https://dev-sc.yunqueyi.com/',
// target: 'https://test1-sc.yunqueyi.com/',
// target: 'https://uat-sc.yunqueyi.com/',
// http://10.241.65.90:3000/mock/1071/cs/route/removeUser
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册