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
b0a07f7a
authored
Jun 05, 2020
by
施宇
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'lt_yaohaoyou' into Development
# Conflicts: # view/11.js
parents
b6125f72
9a0d6938
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
src/store/modules/gooddetail/gooddetail.js
src/views/oscilloscope/Index.vue
view/10.js
view/app.js
src/store/modules/gooddetail/gooddetail.js
View file @
b0a07f7a
...
...
@@ -66,6 +66,7 @@ const actions = {
addGoods
({
commit
},
payload
)
{
console
.
log
(
payload
)
const
toast
=
Toast
.
loading
({
message
:
'加载中...'
,
duration
:
0
,
...
...
@@ -82,8 +83,12 @@ const actions = {
if
(
payload
.
data
.
type
==
1
)
{
window
.
location
.
href
=
"/v3/order/confirm?type=zy&k="
+
payload
.
data
.
k
}
else
{
if
(
payload
.
invitedId
){
window
.
location
.
href
=
"/v3/order/confirm?type=other&k="
+
payload
.
data
.
k
+
"&invitedId="
+
payload
.
invitedId
}
else
{
window
.
location
.
href
=
"/v3/order/confirm?type=other&k="
+
payload
.
data
.
k
}
}
}
else
{
state
.
isShowAlert
=
true
;
state
.
tipText
=
data
.
err_msg
...
...
src/views/oscilloscope/Index.vue
View file @
b0a07f7a
...
...
@@ -113,6 +113,7 @@ export default {
name
:
"oscilloscope"
,
data
()
{
return
{
invitedId
:
""
,
title
:
""
,
meaushow
:
true
,
bgcolor
:
"#fafafa"
,
...
...
@@ -121,6 +122,13 @@ export default {
};
},
created
(){
let
{
invitedId
}
=
this
.
$route
.
query
;
if
(
invitedId
){
SetCookie
(
'sbqinvitedId'
,
invitedId
,
1
);
this
.
invitedId
=
invitedId
}
else
{
getCookie
(
'sbqinvitedId'
)
&&
(
this
.
invitedId
=
getCookie
(
'sbqinvitedId'
));
}
this
.
oscilloscopeinvited
();
this
.
getBannerData
();
this
.
yaoHaoYouJP
();
...
...
@@ -170,15 +178,9 @@ export default {
this
.
animate
=
false
;
},
500
)},
oscilloscopeinvited
()
{
let
{
invitedId
}
=
this
.
$route
.
query
;
let
userId
=
util
.
getCookie
(
"Yo4teW_uid"
);
let
data
=
{};
if
(
invitedId
){
SetCookie
(
'sbqinvitedId'
,
invitedId
,
1
);
data
[
'invited_uid'
]
=
invitedId
}
else
{
getCookie
(
'sbqinvitedId'
)
&&
(
data
[
'user_id '
]
=
getCookie
(
'sbqinvitedId'
));
}
this
.
invitedId
&&
(
data
[
'invited_uid '
]
=
this
.
invitedId
);
userId
&&
(
data
[
'user_id '
]
=
userId
);
//统计邀请的人数和页面访问统计
this
.
$store
.
dispatch
({
...
...
@@ -210,7 +212,8 @@ export default {
};
this
.
$store
.
dispatch
({
type
:
"addGoods"
,
data
:
{
datax
:
datax
}
data
:
{
datax
:
datax
},
invitedId
:
this
.
invitedId
});
})
},
...
...
view/10.js
View file @
b0a07f7a
This diff is collapsed.
Click to expand it.
view/app.js
View file @
b0a07f7a
...
...
@@ -4326,7 +4326,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 vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.11@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.8.4@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.9.4@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n zygoodDetail: {},\n lygoodDetail: {},\n isShowAlert: false,\n tipText: \"\"\n};\nvar mutations = {\n changeZyGoodDetail: function changeZyGoodDetail(state, payload) {\n var data = payload.data;\n state.zygoodDetail = data;\n },\n changeLyGoodDetail: function changeLyGoodDetail(state, payload) {\n var data = payload.data;\n state.lygoodDetail = data;\n },\n closeAlert: function closeAlert(state) {\n state.isShowAlert = false, state.tipText = \"\";\n }\n};\nvar actions = {\n getDetailData: function getDetailData(_ref, payload) {\n var commit = _ref.commit;\n var toast = vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...',\n duration: 0,\n forbidClick: true,\n loadingType: 'spinner'\n });\n state.zygoodDetail = {};\n state.lygoodDetail = {};\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].goodDetail(qs.stringify(payload.data)).then(function (res) {\n toast.clear();\n var data = res.data;\n\n if (data.err_code == 0) {\n if (data.data.goods_type == 3 || data.data.goods_type == 4) {\n //自营\n commit('changeZyGoodDetail', {\n data: data.data\n });\n } else if (data.data.goods_type == 1 || data.data.goods_type == 2) {\n //联营\n commit(\"changeLyGoodDetail\", {\n //过滤数据\n data: data.data\n });\n }\n } else {}\n }).catch(function (err) {\n toast.clear();\n });\n },\n addGoods: function addGoods(_ref2, payload) {\n var commit = _ref2.commit;\n
var toast = vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...',\n duration: 0,\n forbidClick: true\n });\n state.isShowAlert = false;\n state.tipText = \"\";\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].addGood(qs.stringify(payload.data.datax)).then(function (res) {\n toast.clear();\n var data = res.data;\n\n if (data.err_code == 0) {\n if (payload.data.datax.buy == 1) {\n window.sessionStorage.setItem(\"car_xk\", data.data);\n\n if (payload.data.type == 1) {\n window.location.href = \"/v3/order/confirm?type=zy&k=\" + payload.data.k;\n } else {\n window.location.href = \"/v3/order/confirm?type=other&k=\" + payload.data.k;
\n }\n } else {\n state.isShowAlert = true;\n state.tipText = data.err_msg;\n }\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])(data.err_msg);\n }\n }).catch(function (err) {\n toast.clear();\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])(err);\n });\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n actions: actions,\n mutations: mutations\n});\n\n//# sourceURL=webpack:///./src/store/modules/gooddetail/gooddetail.js?"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.11@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.8.4@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.9.4@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n zygoodDetail: {},\n lygoodDetail: {},\n isShowAlert: false,\n tipText: \"\"\n};\nvar mutations = {\n changeZyGoodDetail: function changeZyGoodDetail(state, payload) {\n var data = payload.data;\n state.zygoodDetail = data;\n },\n changeLyGoodDetail: function changeLyGoodDetail(state, payload) {\n var data = payload.data;\n state.lygoodDetail = data;\n },\n closeAlert: function closeAlert(state) {\n state.isShowAlert = false, state.tipText = \"\";\n }\n};\nvar actions = {\n getDetailData: function getDetailData(_ref, payload) {\n var commit = _ref.commit;\n var toast = vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...',\n duration: 0,\n forbidClick: true,\n loadingType: 'spinner'\n });\n state.zygoodDetail = {};\n state.lygoodDetail = {};\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].goodDetail(qs.stringify(payload.data)).then(function (res) {\n toast.clear();\n var data = res.data;\n\n if (data.err_code == 0) {\n if (data.data.goods_type == 3 || data.data.goods_type == 4) {\n //自营\n commit('changeZyGoodDetail', {\n data: data.data\n });\n } else if (data.data.goods_type == 1 || data.data.goods_type == 2) {\n //联营\n commit(\"changeLyGoodDetail\", {\n //过滤数据\n data: data.data\n });\n }\n } else {}\n }).catch(function (err) {\n toast.clear();\n });\n },\n addGoods: function addGoods(_ref2, payload) {\n var commit = _ref2.commit;\n
console.log(payload);\n var toast = vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...',\n duration: 0,\n forbidClick: true\n });\n state.isShowAlert = false;\n state.tipText = \"\";\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].addGood(qs.stringify(payload.data.datax)).then(function (res) {\n toast.clear();\n var data = res.data;\n\n if (data.err_code == 0) {\n if (payload.data.datax.buy == 1) {\n window.sessionStorage.setItem(\"car_xk\", data.data);\n\n if (payload.data.type == 1) {\n window.location.href = \"/v3/order/confirm?type=zy&k=\" + payload.data.k;\n } else {\n if (payload.invitedId) {\n window.location.href = \"/v3/order/confirm?type=other&k=\" + payload.data.k + \"&invitedId=\" + payload.invitedId;\n } else {\n window.location.href = \"/v3/order/confirm?type=other&k=\" + payload.data.k;\n }
\n }\n } else {\n state.isShowAlert = true;\n state.tipText = data.err_msg;\n }\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])(data.err_msg);\n }\n }).catch(function (err) {\n toast.clear();\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])(err);\n });\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n actions: actions,\n mutations: mutations\n});\n\n//# sourceURL=webpack:///./src/store/modules/gooddetail/gooddetail.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