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
703d757b
authored
May 29, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
h5zyly
parent
73aeebc1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
15 deletions
src/store/modules/gooddetail/gooddetail.js
src/views/common/GoodsOne.vue
src/views/common/lyDetail.vue
src/views/common/zyDetail.vue
view/14.js
view/15.js
view/3.js
view/app.js
src/store/modules/gooddetail/gooddetail.js
View file @
703d757b
...
@@ -93,6 +93,7 @@ const actions = {
...
@@ -93,6 +93,7 @@ const actions = {
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
toast
.
clear
();
toast
.
clear
();
Toast
(
err
)
});
});
},
},
}
}
...
...
src/views/common/GoodsOne.vue
View file @
703d757b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"block oneDataGoods"
v-for=
"(itemchild,indexdata) in dataList"
>
<div
class=
"block oneDataGoods"
v-for=
"(itemchild,indexdata) in dataList"
>
<dl
class=
"mui-row img-box"
>
<dl
class=
"mui-row img-box"
>
<a
<a
:href=
"isZy?(
'https://m.ichunt.com/item/'+itemchild.goods_id+'.html?ptag=selfshop'):('https://m.ichunt.com
/goods_'+itemchild.goods_id+'.html?ptag=lxshop')"
:href=
"isZy?(
hostName+'/item/'+itemchild.goods_id+'.html?ptag=selfshop'):(hostName+'
/goods_'+itemchild.goods_id+'.html?ptag=lxshop')"
>
>
<dt
v-lazy-container=
"
{selector:'img'}">
<dt
v-lazy-container=
"
{selector:'img'}">
<img
<img
...
@@ -132,6 +132,7 @@ export default {
...
@@ -132,6 +132,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
hostName
:
window
.
location
.
origin
,
limitLength
:
3
,
limitLength
:
3
,
defaultBtn
:
'更多梯度价格
<
i
class
=
"icon-bot"
><
/i>
'
defaultBtn
:
'更多梯度价格
<
i
class
=
"icon-bot"
><
/i>
'
};
};
...
...
src/views/common/lyDetail.vue
View file @
703d757b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"details-head"
>
<div
class=
"details-head"
>
<div
class=
"head_top clr"
>
<div
class=
"head_top clr"
>
<div
class=
"head_top_left fl"
>
<div
class=
"head_top_left fl"
>
<img
:src=
"goodDetail.brand_logo"
@
error=
"imgErr"
@
click=
"showImagePreview"
>
<img
:src=
"goodDetail.brand_logo
||'https://www.ichunt.com/v3/dist/res/m/images/materiel_img_3.png'
"
@
error=
"imgErr"
@
click=
"showImagePreview"
>
</div>
</div>
<div
class=
"head_top_right"
>
<div
class=
"head_top_right"
>
<h4>
<h4>
...
@@ -87,13 +87,13 @@
...
@@ -87,13 +87,13 @@
<span
v-html=
"v.purchases+'+'"
></span>
<span
v-html=
"v.purchases+'+'"
></span>
</td>
</td>
<td
class=
"xs-3"
>
<td
class=
"xs-3"
>
<span
v-html=
"
v.price_cn+'¥'
"
></span>
<span
v-html=
"
'¥'+v.price_cn
"
></span>
</td>
</td>
<td
class=
"xs-3"
>
<td
class=
"xs-3"
>
<span
v-html=
"
v.price_ac+'¥'
"
></span>
<span
v-html=
"
'¥'+v.price_ac
"
></span>
</td>
</td>
<td
class=
"xs-3"
>
<td
class=
"xs-3"
>
<span
v-html=
"
v.price_us+'$'
"
></span>
<span
v-html=
"
'$'+v.price_us
"
></span>
</td>
</td>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -101,10 +101,10 @@
...
@@ -101,10 +101,10 @@
<span
v-html=
"v.purchases+'+'"
></span>
<span
v-html=
"v.purchases+'+'"
></span>
</td>
</td>
<td
class=
"xs-4"
>
<td
class=
"xs-4"
>
<span
v-html=
"
v.price_cn+'¥'
"
></span>
<span
v-html=
"
'¥'+v.price_cn
"
></span>
</td>
</td>
<td
class=
"xs-4"
>
<td
class=
"xs-4"
>
<span
v-html=
"
v.price_us+'$'
"
></span>
<span
v-html=
"
'$'+v.price_us
"
></span>
</td>
</td>
</
template
>
</
template
>
</tr>
</tr>
...
@@ -286,7 +286,7 @@ export default {
...
@@ -286,7 +286,7 @@ export default {
},
},
methods
:
{
methods
:
{
showImagePreview
(
position
,
timer
)
{
showImagePreview
(
position
,
timer
)
{
let
images
=
[
this
.
goodDetail
.
brand_logo
];
let
images
=
[
this
.
goodDetail
.
brand_logo
||
'https://www.ichunt.com/v3/dist/res/m/images/materiel_img_3.png'
];
const
instance
=
ImagePreview
({
const
instance
=
ImagePreview
({
images
,
images
,
asyncClose
:
!!
timer
,
asyncClose
:
!!
timer
,
...
...
src/views/common/zyDetail.vue
View file @
703d757b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"details-head"
>
<div
class=
"details-head"
>
<div
class=
"head_top clr"
>
<div
class=
"head_top clr"
>
<div
class=
"head_top_left fl"
>
<div
class=
"head_top_left fl"
>
<img
:src=
"goodDetail.brand_logo"
@
onerror=
"imgErr"
@
click=
"showImagePreview"
>
<img
:src=
"goodDetail.brand_logo
||'https://www.ichunt.com/v3/dist/res/m/images/materiel_img_3.png'
"
@
onerror=
"imgErr"
@
click=
"showImagePreview"
>
</div>
</div>
<div
class=
"head_top_right"
>
<div
class=
"head_top_right"
>
<h4>
<h4>
...
@@ -96,18 +96,18 @@
...
@@ -96,18 +96,18 @@
<span
v-html=
"v.purchases+'+'"
></span>
<span
v-html=
"v.purchases+'+'"
></span>
</td>
</td>
<td
class=
"xs-3"
>
<td
class=
"xs-3"
>
<span
v-html=
"
v.price_cn+'¥'
"
></span>
<span
v-html=
"
'¥'+v.price_cn
"
></span>
</td>
</td>
<td
class=
"xs-3"
>
<td
class=
"xs-3"
>
<span
v-html=
"
v.price_ac+'¥'
"
></span>
<span
v-html=
"
'¥'+v.price_ac
"
></span>
</td>
</td>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<td
class=
"xs-6"
>
<td
class=
"xs-6"
>
<span
v-html=
"
v.purchases+'+'
"
></span>
<span
v-html=
"
'¥'+v.purchases
"
></span>
</td>
</td>
<td
class=
"xs-6"
>
<td
class=
"xs-6"
>
<span
v-html=
"
v.price_cn+'¥'
"
></span>
<span
v-html=
"
'¥'+v.price_cn
"
></span>
</td>
</td>
</
template
>
</
template
>
</tr>
</tr>
...
@@ -307,7 +307,7 @@ export default {
...
@@ -307,7 +307,7 @@ export default {
},
},
methods
:
{
methods
:
{
showImagePreview
(
position
,
timer
)
{
showImagePreview
(
position
,
timer
)
{
let
images
=
[
this
.
goodDetail
.
brand_logo
]
let
images
=
[
this
.
goodDetail
.
brand_logo
||
'https://www.ichunt.com/v3/dist/res/m/images/materiel_img_3.png'
]
const
instance
=
ImagePreview
({
const
instance
=
ImagePreview
({
images
,
images
,
asyncClose
:
!!
timer
,
asyncClose
:
!!
timer
,
...
...
view/14.js
View file @
703d757b
This diff is collapsed.
Click to expand it.
view/15.js
View file @
703d757b
This diff is collapsed.
Click to expand it.
view/3.js
View file @
703d757b
This diff is collapsed.
Click to expand it.
view/app.js
View file @
703d757b
...
@@ -4782,7 +4782,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
...
@@ -4782,7 +4782,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/
(
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 vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.15@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.7.0@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 });\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.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.15@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.7.0@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?"
);
/***/
}),
/***/
}),
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