Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c9042abe
authored
May 13, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
2ca60968
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
src/store/modules/common.js
view/app.js
src/store/modules/common.js
View file @
c9042abe
...
@@ -49,8 +49,10 @@ const actions = {
...
@@ -49,8 +49,10 @@ const actions = {
Services
.
loginCheck
().
then
((
res
)
=>
{
Services
.
loginCheck
().
then
((
res
)
=>
{
let
data
=
res
.
data
;
let
data
=
res
.
data
;
if
(
payload
.
is_jump
)
{
if
(
payload
.
is_jump
)
{
if
(
data
.
err_code
==
11010
){
if
(
data
.
err_code
==
11010
)
{
window
.
location
.
href
=
'/h5/view/'
window
.
location
.
href
=
'/h5/view/'
}
else
if
(
data
.
err_code
==
11030
)
{
window
.
location
.
href
=
'/v3/login'
}
}
}
else
{
}
else
{
commit
({
commit
({
...
...
view/app.js
View file @
c9042abe
...
@@ -4687,7 +4687,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
...
@@ -4687,7 +4687,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.promise */ \"./node_modules/_core-js@2.6.3@core-js/modules/es6.promise.js\");\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/_core-js@2.6.3@core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.5.22@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.5.7@vant/es/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util */ \"./src/util/index.js\");\n\n\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_2__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Toast\"]);\nvar state = {\n cartCount: '',\n loginCheck: false,\n phpParams: {}\n};\nvar mutations = {\n cartCount: function cartCount(state, payload) {\n state.cartCount = payload.data == 0 ? '' : payload.data;\n },\n loginCheck: function loginCheck(state, payload) {\n if (payload.data.err_code == 0) {\n //强登录态\n state.loginCheck = true;\n } else if (payload.data.err_code == 11030) {\n //弱登录态\n state.loginCheck = true;\n } else {\n state.loginCheck = false;\n }\n },\n phpParams: function phpParams(state, payload) {\n state.phpParams = payload.data.data;\n }\n};\nvar actions = {\n cartCount: function cartCount(_ref, payload) {\n var commit = _ref.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].cartCount().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'cartCount',\n data: data.data\n });\n }\n }).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n },\n loginCheck: function loginCheck(_ref2, payload) {\n var commit = _ref2.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].loginCheck().then(function (res) {\n var data = res.data;\n\n if (payload.is_jump) {\n if (data.err_code == 11010) {\n window.location.href = '/h5/view/';\n }\n } else {\n commit({\n type: 'loginCheck',\n data: data\n });\n }\n }).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n },\n customsrService: function customsrService(_ref3, payload) {\n var commit = _ref3.commit;\n var params = {\n pf: window.lxpf,\n searchModel: ''\n };\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].customsrService(params).then(function (res) {}).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n },\n getCommonParams: function getCommonParams(_ref4, payload) {\n var commit = _ref4.commit;\n var params = _util__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getParams();\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].getCommonParams(params).then(function (res) {\n var data = res.data;\n commit({\n type: 'phpParams',\n data: data\n });\n }).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/common.js?"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.promise */ \"./node_modules/_core-js@2.6.3@core-js/modules/es6.promise.js\");\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/_core-js@2.6.3@core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.5.22@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.5.7@vant/es/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util */ \"./src/util/index.js\");\n\n\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_2__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Toast\"]);\nvar state = {\n cartCount: '',\n loginCheck: false,\n phpParams: {}\n};\nvar mutations = {\n cartCount: function cartCount(state, payload) {\n state.cartCount = payload.data == 0 ? '' : payload.data;\n },\n loginCheck: function loginCheck(state, payload) {\n if (payload.data.err_code == 0) {\n //强登录态\n state.loginCheck = true;\n } else if (payload.data.err_code == 11030) {\n //弱登录态\n state.loginCheck = true;\n } else {\n state.loginCheck = false;\n }\n },\n phpParams: function phpParams(state, payload) {\n state.phpParams = payload.data.data;\n }\n};\nvar actions = {\n cartCount: function cartCount(_ref, payload) {\n var commit = _ref.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].cartCount().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'cartCount',\n data: data.data\n });\n }\n }).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n },\n loginCheck: function loginCheck(_ref2, payload) {\n var commit = _ref2.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].loginCheck().then(function (res) {\n var data = res.data;\n\n if (payload.is_jump) {\n if (data.err_code == 11010) {\n window.location.href = '/h5/view/';\n }
else if (data.err_code == 11030) {\n window.location.href = '/v3/login';\n }
\n } else {\n commit({\n type: 'loginCheck',\n data: data\n });\n }\n }).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n },\n customsrService: function customsrService(_ref3, payload) {\n var commit = _ref3.commit;\n var params = {\n pf: window.lxpf,\n searchModel: ''\n };\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].customsrService(params).then(function (res) {}).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n },\n getCommonParams: function getCommonParams(_ref4, payload) {\n var commit = _ref4.commit;\n var params = _util__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getParams();\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].getCommonParams(params).then(function (res) {\n var data = res.data;\n commit({\n type: 'phpParams',\n data: data\n });\n }).catch(function (err) {\n console.log('网络出现问题,请重试');\n });\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/common.js?"
);
/***/
}),
/***/
}),
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment