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