提交 694302c0 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-profexam-pc-0731' into release

* dev-profexam-pc-0731:
  no message
  device_type:4表示H5登录
  登录成功,开始跳转页面>>>>>>
  添加日志等信息
  带回token信息等
  上下文根据自己
  1、样式调整等 2、device_type: 1
  内容有修改等

# Conflicts:
#	.gitignore
......@@ -129,15 +129,21 @@
});
},
handleLoginSuccess(res) {
delCookie('token');
setCookie('token', res.data.token);
// delCookie('token');
// setCookie('token', res.data.token);
this.signAnAgreements();
if(sessionStorage.getItem('target_url')) {
const target_url = decodeURIComponent(sessionStorage.getItem('target_url'));
let target_url = decodeURIComponent(sessionStorage.getItem('target_url')) || '';
if(target_url.indexOf('?') != -1) {
target_url += `&token=${res.data.token}`
} else {
target_url += `?token=${res.data.token}`
}
console.log('登录成功,开始跳转页面>>>>>>', target_url);
window.location.replace(target_url);
} else {
console.log('登录成功,后面跳转页面>>>>>>'); // 此行代码测试用,后续上线前删掉 -----------------------------------------------
console.log('登录成功,后面跳转页面>>>>>>1'); // 此行代码测试用,后续上线前删掉 -----------------------------------------------
}
},
signAnAgreements() {
......@@ -154,6 +160,8 @@
<style lang="less">
.msg-code-wrap {
display: flex;
justify-content: center;
overflow: hidden;
.simple-input-content {
span {
......
......@@ -66,7 +66,7 @@ module.exports = {
** Build configuration
*/
router: {
base: '/pica_login/' //上下文根据自己的需求自行打开修改
base: '/pc_login/' //上下文根据自己的需求自行打开修改
},
build: {
postcss: {
......
此差异已折叠。
......@@ -6,9 +6,9 @@
"private": true,
"scripts": {
"test": "jest",
"dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=0.0.0.0 PORT=3015 nodemon server/index.js --watch server",
"dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=0.0.0.0 PORT=3050 nodemon server/index.js --watch server",
"build": "NUXT_ENV_APP=${ENV} nuxt build",
"start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3015 NODE_ENV=production node server/index.js",
"start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3050 NODE_ENV=production node server/index.js",
"generate": "nuxt generate"
},
"dependencies": {
......
......@@ -154,7 +154,11 @@
<style lang="less">
.msg-code-page-wrap {
// min-width: 300px;
// max-width: 600px;
margin: 0 auto;
width: 100%;
text-align: center;
height: auto;
box-sizing: border-box;
padding: 0 25px;
......
......@@ -100,7 +100,13 @@
setCookie('token', data.token);
this.signAnAgreements();
if(sessionStorage.getItem('target_url')) {
const target_url = decodeURIComponent(sessionStorage.getItem('target_url'));
let target_url = decodeURIComponent(sessionStorage.getItem('target_url'));
if(target_url.indexOf('?') != -1) {
target_url += `&token=${data.token}`
} else {
target_url += `?token=${data.token}`
}
console.log('登录成功,开始跳转页面>>>>>>', target_url);
window.location.replace(target_url);
} else {
console.log('登录成功,后面跳转页面>>>>>>'); // 此行代码测试用,后续上线前删掉 -----------------------------------------------
......@@ -137,6 +143,7 @@
box-sizing: border-box;
padding: 0 25px;
.inner-title{
text-align: center;
width: 100%; height: 68px;
padding-top: 6px;
line-height: 68px;
......
......@@ -223,6 +223,7 @@
font-size: 20px;
line-height: 20px;
margin: 30px 0 40px 0;
text-align: center;
}
.button-container {
margin-top: 16px;
......
......@@ -39,26 +39,26 @@
return false;
});
}
// 按钮拖动事件
$divMove.on('touchstart', function (e) {
console.log('touchstart');
// 清除提示信息
$this.find(".code-tip").html("");
var event = e || window.event;
// // 按钮拖动事件
// $divMove.on('touchstart', function (e) {
// console.log('touchstart');
// // 清除提示信息
// $this.find(".code-tip").html("");
// var event = e || window.event;
// mX = event.originalEvent.touches[0].pageX;
mX = event.originalEvent.pageX;
dX = $divWrap.offset().left;
dY = $divWrap.offset().top;
// // mX = event.originalEvent.touches[0].pageX;
// mX = event.originalEvent.pageX;
// dX = $divWrap.offset().left;
// dY = $divWrap.offset().top;
console.log('event', mX, dX, dY)
isDown = true; // 鼠标拖拽启
$(this).addClass("active");
// 修改按钮阴影
$divMove.css({
"box-shadow": "0 0 8px #666"
});
}); // 按钮拖动事件
// console.log('event', mX, dX, dY)
// isDown = true; // 鼠标拖拽启
// $(this).addClass("active");
// // 修改按钮阴影
// $divMove.css({
// "box-shadow": "0 0 8px #666"
// });
// }); // 按钮拖动事件
$divMove.on('mousedown', function (e) {
console.log('mousedown');
// 清除提示信息
......@@ -88,18 +88,19 @@
$this.find(".icon-push").unbind('click').click(function () {
opts.refreshcallback();
});
// // 鼠标点击松手事件
// $divMove.on('touchend', function (e) {
// var lastX = $this.find(".code-mask").offset().left - dX - 1;
// isDown = false; // 鼠标拖拽启
// $divMove.removeClass("active");
// // 还原按钮阴影
// $divMove.css({
// "box-shadow": "0 0 3px #ccc"
// });
// var imgW = $("#BigImg").width()
// returncode(lastX, imgW);
// });
// 鼠标点击松手事件
$divMove.on('touchend', function (e) {
var lastX = $this.find(".code-mask").offset().left - dX - 1;
isDown = false; // 鼠标拖拽启
$divMove.removeClass("active");
// 还原按钮阴影
$divMove.css({
"box-shadow": "0 0 3px #ccc"
});
var imgW = $("#BigImg").width()
returncode(lastX, imgW);
}); // 鼠标点击松手事件
$divMove.on('mouseup', function (e) {
console.log('mouseup');
var lastX = $this.find(".code-mask").offset().left - dX - 1;
......@@ -112,28 +113,27 @@
var imgW = $("#BigImg").width()
returncode(lastX, imgW);
});
// 滑动事件
$divWrap.on('touchmove', function (event) {
console.log('touchmove', event);
var event = event || window.event;
// var x = event.originalEvent.touches[0].pageX; // 鼠标滑动时的X轴
var x = event.originalEvent.pageX; // 鼠标滑动时的X轴
if (isDown) {
if (x > (dX + 30) && x < dX + $(this).width() - 20) {
$divMove.css({
"left": (x - dX - 20) + "px"
}); // div动态位置赋值
$this.find(".code-mask").css({
"left": (x - dX - 30) + "px"
});
}
}
event.preventDefault();
});
// // 滑动事件
// $divWrap.on('touchmove', function (event) {
// console.log('touchmove', event);
// var event = event || window.event;
// // var x = event.originalEvent.touches[0].pageX; // 鼠标滑动时的X轴
// var x = event.originalEvent.pageX; // 鼠标滑动时的X轴
// if (isDown) {
// if (x > (dX + 30) && x < dX + $(this).width() - 20) {
// $divMove.css({
// "left": (x - dX - 20) + "px"
// }); // div动态位置赋值
// $this.find(".code-mask").css({
// "left": (x - dX - 30) + "px"
// });
// }
// }
// event.preventDefault();
// });
// 滑动事件
$divWrap.on('mousemove', function (event) {
console.log('mousemove', event);
// debugger
var event = event || window.event;
// var x = event.originalEvent.touches[0].pageX; // 鼠标滑动时的X轴
var x = event.originalEvent.pageX; // 鼠标滑动时的X轴
......@@ -205,7 +205,6 @@
$this.find(".code-k-div").remove();
},
800);
}
// 验证失败
opts.getfail = function (txt) {
......
......@@ -37,10 +37,10 @@ export default function(options) {
if (typeof options !== 'object') {
throw new Error('make sure the params options is an Object...');
}
console.log('isIOS, isAndroid', isIOS(), isAndroid());
if(!isIOS() && !isAndroid()) {
API_CONFIG.headers.sourceType = 5;
}
// console.log('isIOS, isAndroid', isIOS(), isAndroid());
// if(!isIOS() && !isAndroid()) {
// API_CONFIG.headers.sourceType = 5;
// }
const cf = JSON.parse(JSON.stringify(API_CONFIG));
options = Object.assign(cf, options); // 合并 config
return new Promise((resolve, reject) => {
......
......@@ -25,7 +25,6 @@ function getAesKey(len) {
async function sendEncryptRequest(content, cb){
console.log('content',content)
content = JSON.stringify(content); // 后端要求转 string
// debugger;
let params = null
if(pubKey){ // pubKey获取过就不用再获取了
let params = formatContent(content, pubKey);
......@@ -38,14 +37,12 @@ async function sendEncryptRequest(content, cb){
// get public key
function handleGetPubKey(content, cb){
// debugger;
getPubKey().then(res => {
// console.log('>>>>>>>>>>>>>>>>>>>> publicKey: ', res);
/* if(res.status && res.status === 200) {
res = res.data;
}*/
console.log('res',res)
// debugger;
if(res.code == '000000'){
pubKey = res.data;
if(cb){
......
......@@ -3,7 +3,8 @@ import { getTerminalType, detectOS, getDeviceInfo } from '@/utils/getDeviceInfo'
const { NUXT_ENV_APP } = process.env;
export const BASE_URL = {
dev:'https://dev-sc.yunqueyi.com',
// dev:'https://dev-sc.yunqueyi.com',
dev: 'https://test1-sc.yunqueyi.com',
test: 'https://test1-sc.yunqueyi.com',
uat: 'https://uat-sc.yunqueyi.com',
prod: 'https://sc.yunqueyi.com'
......@@ -26,7 +27,8 @@ export const API_CONFIG = {
'Content-Type': 'application/json;charset=UTF-8',
'deviceInfo': deviceInfo, //设备信息
'productType': 1, // 1表示云鹊医产品系
'sourceType': 4, // 4表示H5登录
'sourceType': 4, // 4表示H5登录,
'device_type': 1,
},
timeout: 10000,
withCredentials: false,
......@@ -61,8 +63,14 @@ export const ENV_CONFIG = {
apiUrl: 'https://dev-api.yunqueyi.com/',
shareUrl:'https://dev-phome.yunqueyi.com/',
topicUrl:'https://dev-discuss.yunqueyi.com',
wxLoginUrl: 'https://sc.yunqueyi.com/wechats/users',
baseUrl: 'https://test1-sc.yunqueyi.com/',
apiUrl: 'https://test1-api.yunqueyi.com/',
shareUrl: 'https://test1-phome.yunqueyi.com/',
topicUrl: 'https://test1-discuss.yunqueyi.com',
wxLoginUrl : 'https://test1-sc.yunqueyi.com/wechats/users',
domain:'https://dev-sc.yunqueyi.com/account',
APPID:'wx2c577552a2d28550',
......
......@@ -100,7 +100,7 @@ export const detectOS = () => {
return "other";
};
export const getDeviceInfo = () => {
let deviceInfo = { "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": "" };
let deviceInfo = { "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": "1" };
try{
let terminalType = getTerminalType();
let OS = detectOS();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册