Commit 703d757b by 施宇

h5zyly

parent 73aeebc1
......@@ -93,6 +93,7 @@ const actions = {
}
}).catch(function (err) {
toast.clear();
Toast(err)
});
},
}
......
......@@ -3,7 +3,7 @@
<div class="block oneDataGoods" v-for="(itemchild,indexdata) in dataList">
<dl class="mui-row img-box">
<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'}">
<img
......@@ -132,6 +132,7 @@ export default {
},
data() {
return {
hostName:window.location.origin,
limitLength: 3,
defaultBtn: '更多梯度价格<i class="icon-bot"></i>'
};
......
......@@ -3,7 +3,7 @@
<div class="details-head">
<div class="head_top clr">
<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 class="head_top_right">
<h4>
......@@ -87,13 +87,13 @@
<span v-html="v.purchases+'+'"></span>
</td>
<td class="xs-3">
<span v-html="v.price_cn+'¥'"></span>
<span v-html="'¥'+v.price_cn"></span>
</td>
<td class="xs-3">
<span v-html="v.price_ac+'¥'"></span>
<span v-html="'¥'+v.price_ac"></span>
</td>
<td class="xs-3">
<span v-html="v.price_us+'$'"></span>
<span v-html="'$'+v.price_us"></span>
</td>
</template>
<template v-else>
......@@ -101,10 +101,10 @@
<span v-html="v.purchases+'+'"></span>
</td>
<td class="xs-4">
<span v-html="v.price_cn+'¥'"></span>
<span v-html="'¥'+v.price_cn"></span>
</td>
<td class="xs-4">
<span v-html="v.price_us+'$'"></span>
<span v-html="'$'+v.price_us"></span>
</td>
</template>
</tr>
......@@ -286,7 +286,7 @@ export default {
},
methods: {
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({
images,
asyncClose: !!timer,
......
......@@ -3,7 +3,7 @@
<div class="details-head">
<div class="head_top clr">
<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 class="head_top_right">
<h4>
......@@ -96,18 +96,18 @@
<span v-html="v.purchases+'+'"></span>
</td>
<td class="xs-3">
<span v-html="v.price_cn+'¥'"></span>
<span v-html="'¥'+v.price_cn"></span>
</td>
<td class="xs-3">
<span v-html="v.price_ac+'¥'"></span>
<span v-html="'¥'+v.price_ac"></span>
</td>
</template>
<template v-else>
<td class="xs-6">
<span v-html="v.purchases+'+'"></span>
<span v-html="'¥'+v.purchases"></span>
</td>
<td class="xs-6">
<span v-html="v.price_cn+'¥'"></span>
<span v-html="'¥'+v.price_cn"></span>
</td>
</template>
</tr>
......@@ -307,7 +307,7 @@ export default {
},
methods: {
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({
images,
asyncClose: !!timer,
......
......@@ -4782,7 +4782,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.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?");
/***/ }),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment