提交 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: {
......
...@@ -6117,8 +6117,7 @@ ...@@ -6117,8 +6117,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -6139,14 +6138,12 @@ ...@@ -6139,14 +6138,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -6161,20 +6158,17 @@ ...@@ -6161,20 +6158,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -6291,8 +6285,7 @@ ...@@ -6291,8 +6285,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -6304,7 +6297,6 @@ ...@@ -6304,7 +6297,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -6319,7 +6311,6 @@ ...@@ -6319,7 +6311,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -6327,14 +6318,12 @@ ...@@ -6327,14 +6318,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -6353,7 +6342,6 @@ ...@@ -6353,7 +6342,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -6434,8 +6422,7 @@ ...@@ -6434,8 +6422,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -6447,7 +6434,6 @@ ...@@ -6447,7 +6434,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -6533,8 +6519,7 @@ ...@@ -6533,8 +6519,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -6570,7 +6555,6 @@ ...@@ -6570,7 +6555,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -6590,7 +6574,6 @@ ...@@ -6590,7 +6574,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -6634,14 +6617,12 @@ ...@@ -6634,14 +6617,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -8115,8 +8096,7 @@ ...@@ -8115,8 +8096,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -8137,14 +8117,12 @@ ...@@ -8137,14 +8117,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -8159,20 +8137,17 @@ ...@@ -8159,20 +8137,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -8289,8 +8264,7 @@ ...@@ -8289,8 +8264,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -8302,7 +8276,6 @@ ...@@ -8302,7 +8276,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -8317,7 +8290,6 @@ ...@@ -8317,7 +8290,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -8325,14 +8297,12 @@ ...@@ -8325,14 +8297,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -8351,7 +8321,6 @@ ...@@ -8351,7 +8321,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -8432,8 +8401,7 @@ ...@@ -8432,8 +8401,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -8445,7 +8413,6 @@ ...@@ -8445,7 +8413,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -8531,8 +8498,7 @@ ...@@ -8531,8 +8498,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -8568,7 +8534,6 @@ ...@@ -8568,7 +8534,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -8588,7 +8553,6 @@ ...@@ -8588,7 +8553,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -8632,14 +8596,12 @@ ...@@ -8632,14 +8596,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -12743,8 +12705,7 @@ ...@@ -12743,8 +12705,7 @@
}, },
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -12762,13 +12723,11 @@ ...@@ -12762,13 +12723,11 @@
}, },
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -12781,18 +12740,15 @@ ...@@ -12781,18 +12740,15 @@
}, },
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -12895,8 +12851,7 @@ ...@@ -12895,8 +12851,7 @@
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -12906,7 +12861,6 @@ ...@@ -12906,7 +12861,6 @@
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -12919,20 +12873,17 @@ ...@@ -12919,20 +12873,17 @@
"minimatch": { "minimatch": {
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -12949,7 +12900,6 @@ ...@@ -12949,7 +12900,6 @@
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -13022,8 +12972,7 @@ ...@@ -13022,8 +12972,7 @@
}, },
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -13033,7 +12982,6 @@ ...@@ -13033,7 +12982,6 @@
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -13109,8 +13057,7 @@ ...@@ -13109,8 +13057,7 @@
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -13140,7 +13087,6 @@ ...@@ -13140,7 +13087,6 @@
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -13158,7 +13104,6 @@ ...@@ -13158,7 +13104,6 @@
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -13197,13 +13142,11 @@ ...@@ -13197,13 +13142,11 @@
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true
"optional": true
} }
} }
}, },
......
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册