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
9553340f
authored
Jun 25, 2019
by
肖康
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'XK_carB20190624' into Development
parents
66675249
ff6e0b54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
src/store/modules/user/userInfo.js
view/app.js
src/store/modules/user/userInfo.js
View file @
9553340f
...
...
@@ -28,6 +28,15 @@ const actions = {
let
data
=
res
.
data
;
if
(
data
.
err_code
==
0
)
{
state
.
userInfo
=
data
.
data
;
}
else
if
(
data
.
err_code
==
11030
||
data
.
err_code
==
11010
){
Toast
({
message
:
data
.
err_msg
,
duration
:
3000
});
setTimeout
(
function
(){
window
.
location
.
href
=
'/v3/login?referer='
+
encodeURIComponent
(
window
.
location
.
href
);
},
1000
)
}
else
{
Toast
({
message
:
data
.
err_msg
,
...
...
@@ -83,6 +92,15 @@ const actions = {
},
800
)
}
else
if
(
data
.
err_code
==
11030
||
data
.
err_code
==
11010
){
Toast
({
message
:
data
.
err_msg
,
duration
:
3000
});
setTimeout
(
function
(){
window
.
location
.
href
=
'/v3/login?referer='
+
encodeURIComponent
(
window
.
location
.
href
);
},
1000
)
}
else
{
Toast
({
message
:
data
.
err_msg
,
...
...
view/app.js
View file @
9553340f
...
...
@@ -4003,7 +4003,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.number.constructor */ \"./node_modules/_core-js@2.6.9@core-js/modules/es6.number.constructor.js\");\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.0.2@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.7.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"]);\nvar state = {\n loading: false,\n userInfo: \"\",\n addressInfo: \"\"\n};\nvar mutations = {};\nvar actions = {\n getUserType2: function getUserType2(_ref, payload) {\n var commit = _ref.commit;\n state.loading = true;\n var params = {\n type: 2\n };\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].getUserType(qs.stringify(params)).then(function (res) {\n state.loading = false;\n var data = res.data;\n\n if (data.err_code == 0) {\n state.userInfo = data.data;\n } else
{\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\n },\n allAddressInfo: function allAddressInfo(_ref2, payload) {\n var commit = _ref2.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].allAddress().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n state.addressInfo = data.data;\n }\n });\n },\n changeUserInfo: function changeUserInfo(_ref3, payload) {\n var commit = _ref3.commit;\n state.loading = true;\n var params = {\n nike_name: payload.nike_name,\n com_name: payload.com_name,\n type_id: payload.type_id,\n sex: payload.sex,\n com_telphone: payload.com_telphone,\n com_desc: payload.com_desc,\n com_province_id: payload.com_province_id,\n com_city_id: payload.com_city_id,\n com_area_id: payload.com_area_id,\n com_address: payload.com_address,\n com_mobile: payload.com_mobile\n };\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].changeUserInfo(qs.stringify(params)).then(function (res) {\n state.loading = false;\n var data = res.data;\n\n if (data.err_code == 0) {\n var text_ = data.err_msg;\n\n if (Number(data.point) > 0) {\n text_ = \"恭喜您获得\" + data.point + \"积分\";\n }\n\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: text_,\n duration: 3000\n });\n setTimeout(function () {\n if (payload.urlback) {\n window.location.href = \"/v3/user/order\";\n } else {\n window.location.href = \"/v3/user\";\n }\n }, 8
00);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\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/user/userInfo.js?"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.number.constructor */ \"./node_modules/_core-js@2.6.9@core-js/modules/es6.number.constructor.js\");\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.0.2@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.7.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"]);\nvar state = {\n loading: false,\n userInfo: \"\",\n addressInfo: \"\"\n};\nvar mutations = {};\nvar actions = {\n getUserType2: function getUserType2(_ref, payload) {\n var commit = _ref.commit;\n state.loading = true;\n var params = {\n type: 2\n };\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].getUserType(qs.stringify(params)).then(function (res) {\n state.loading = false;\n var data = res.data;\n\n if (data.err_code == 0) {\n state.userInfo = data.data;\n } else
if (data.err_code == 11030 || data.err_code == 11010) {\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n setTimeout(function () {\n window.location.href = '/v3/login?referer=' + encodeURIComponent(window.location.href);\n }, 1000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\n },\n allAddressInfo: function allAddressInfo(_ref2, payload) {\n var commit = _ref2.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].allAddress().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n state.addressInfo = data.data;\n }\n });\n },\n changeUserInfo: function changeUserInfo(_ref3, payload) {\n var commit = _ref3.commit;\n state.loading = true;\n var params = {\n nike_name: payload.nike_name,\n com_name: payload.com_name,\n type_id: payload.type_id,\n sex: payload.sex,\n com_telphone: payload.com_telphone,\n com_desc: payload.com_desc,\n com_province_id: payload.com_province_id,\n com_city_id: payload.com_city_id,\n com_area_id: payload.com_area_id,\n com_address: payload.com_address,\n com_mobile: payload.com_mobile\n };\n _api_index__WEBPACK_IMPORTED_MODULE_3__[\"services\"].changeUserInfo(qs.stringify(params)).then(function (res) {\n state.loading = false;\n var data = res.data;\n\n if (data.err_code == 0) {\n var text_ = data.err_msg;\n\n if (Number(data.point) > 0) {\n text_ = \"恭喜您获得\" + data.point + \"积分\";\n }\n\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: text_,\n duration: 3000\n });\n setTimeout(function () {\n if (payload.urlback) {\n window.location.href = \"/v3/user/order\";\n } else {\n window.location.href = \"/v3/user\";\n }\n }, 800);\n } else if (data.err_code == 11030 || data.err_code == 11010) {\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n setTimeout(function () {\n window.location.href = '/v3/login?referer=' + encodeURIComponent(window.location.href);\n }, 10
00);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_2__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\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/user/userInfo.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