完善商品数据提交
This commit is contained in:
35
unpackage/dist/dev/mp-weixin/pages/shop/shop.js
vendored
35
unpackage/dist/dev/mp-weixin/pages/shop/shop.js
vendored
@ -101,22 +101,22 @@ var components
|
||||
try {
|
||||
components = {
|
||||
uSwiper: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-swiper/u-swiper */ "components/uview-ui/components/u-swiper/u-swiper").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-swiper/u-swiper.vue */ 357))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-swiper/u-swiper */ "components/uview-ui/components/u-swiper/u-swiper").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-swiper/u-swiper.vue */ 367))
|
||||
},
|
||||
priceFormat: function () {
|
||||
return __webpack_require__.e(/*! import() | components/price-format/price-format */ "components/price-format/price-format").then(__webpack_require__.bind(null, /*! @/components/price-format/price-format.vue */ 390))
|
||||
return __webpack_require__.e(/*! import() | components/price-format/price-format */ "components/price-format/price-format").then(__webpack_require__.bind(null, /*! @/components/price-format/price-format.vue */ 400))
|
||||
},
|
||||
uLine: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-line/u-line */ "components/uview-ui/components/u-line/u-line").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-line/u-line.vue */ 409))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-line/u-line */ "components/uview-ui/components/u-line/u-line").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-line/u-line.vue */ 419))
|
||||
},
|
||||
uButton: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 350))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 360))
|
||||
},
|
||||
uImage: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 364))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 374))
|
||||
},
|
||||
shopSpec: function () {
|
||||
return __webpack_require__.e(/*! import() | components/shop-spec/shop-spec */ "components/shop-spec/shop-spec").then(__webpack_require__.bind(null, /*! @/components/shop-spec/shop-spec.vue */ 507))
|
||||
return __webpack_require__.e(/*! import() | components/shop-spec/shop-spec */ "components/shop-spec/shop-spec").then(__webpack_require__.bind(null, /*! @/components/shop-spec/shop-spec.vue */ 517))
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
@ -142,6 +142,9 @@ var render = function () {
|
||||
var _c = _vm._self._c || _h
|
||||
if (!_vm._isMounted) {
|
||||
_vm.e0 = function ($event) {
|
||||
_vm.showSpec = true
|
||||
}
|
||||
_vm.e1 = function ($event) {
|
||||
_vm.showSpec = false
|
||||
}
|
||||
}
|
||||
@ -278,7 +281,8 @@ var _default = {
|
||||
return {
|
||||
id: 0,
|
||||
showSpec: false,
|
||||
goods: []
|
||||
goods: [],
|
||||
spec: []
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(options) {
|
||||
@ -317,12 +321,25 @@ var _default = {
|
||||
}, _callee);
|
||||
}))();
|
||||
},
|
||||
chooseSpec: function chooseSpec() {
|
||||
this.showSpec = true;
|
||||
// 获取选择的商品规格
|
||||
confirmSpec: function confirmSpec(data) {
|
||||
console.log("data>>>", data.spec);
|
||||
this.spec = data.spec;
|
||||
this.showSpec = false;
|
||||
},
|
||||
// 购买商品
|
||||
onBuy: function onBuy() {
|
||||
// 这里需压判断选购规格
|
||||
if (!this.isLogin) return (0, _login.toLogin)();
|
||||
this.$store.commit("setBuyGoods", {
|
||||
id: this.id,
|
||||
// 商品id
|
||||
num: 1,
|
||||
// 购买商品数量
|
||||
spec: this.spec // 选中的商品规格
|
||||
});
|
||||
|
||||
console.log("this.$>>>", this.$store.state.goods.buyGoods);
|
||||
uni.navigateTo({
|
||||
url: "/pages/order_now/order_now"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user