完善商品数据提交

This commit is contained in:
2025-05-10 18:09:35 +08:00
parent 9cd1e5eaca
commit 00ab75efbc
177 changed files with 3124 additions and 2928 deletions

View File

@ -101,28 +101,28 @@ var components
try {
components = {
uSticky: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-sticky/u-sticky */ "components/uview-ui/components/u-sticky/u-sticky").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-sticky/u-sticky.vue */ 514))
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-sticky/u-sticky */ "components/uview-ui/components/u-sticky/u-sticky").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-sticky/u-sticky.vue */ 524))
},
uSearch: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-search/u-search */ "components/uview-ui/components/u-search/u-search").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-search/u-search.vue */ 493))
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-search/u-search */ "components/uview-ui/components/u-search/u-search").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-search/u-search.vue */ 503))
},
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))
},
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))
},
uIcon: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-icon/u-icon */ "components/uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-icon/u-icon.vue */ 343))
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-icon/u-icon */ "components/uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-icon/u-icon.vue */ 353))
},
uPopup: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-popup/u-popup */ "components/uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-popup/u-popup.vue */ 521))
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-popup/u-popup */ "components/uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-popup/u-popup.vue */ 531))
},
uNumberBox: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-number-box/u-number-box */ "components/uview-ui/components/u-number-box/u-number-box").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-number-box/u-number-box.vue */ 395))
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-number-box/u-number-box */ "components/uview-ui/components/u-number-box/u-number-box").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-number-box/u-number-box.vue */ 405))
},
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) {

View File

@ -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"
});

View File

@ -1 +1 @@
<view><view class="shop"><view><u-swiper vue-id="73adca00-1" list="{{goods.goods_image}}" name="uri" height="500" border-radius="0" mode="number" indicator-pos="bottomRight" bind:__l="__l"></u-swiper></view><view class="bg-white mx24 px24 u-m-t-24 u-padding-top-20 u-padding-bottom-20 br24"><view class="nr">{{goods.name}}</view><view class="mt10 row u-row-between"><view class="row"><view class="primary"><price-format vue-id="73adca00-2" price="{{goods.min_price}}" subscriptSize="{{22}}" firstSize="{{34}}" secondSize="{{26}}" bind:__l="__l"></price-format></view><view class="sale u-text-center primary u-m-l-12">0折</view><view class="primary u-m-l-12"><price-format vue-id="73adca00-3" lineThrough="{{true}}" color="#999" subscriptSize="{{22}}" firstSize="{{22}}" secondSize="{{22}}" price="{{goods.market_price}}" bind:__l="__l"></price-format></view></view><view class="text-999">已售66</view></view><view class="u-m-t-20 u-m-b-20"><u-line vue-id="73adca00-4" color="#eee" bind:__l="__l"></u-line></view><view><view><text>须知</text><text class="text-999 ml20">周一至周日可用</text></view><view class="row-between mt20"><view><text>保障</text><text class="text-999 ml20">随时退 过期自动退</text></view><view><u-button vue-id="73adca00-5" hover-class="none" customStyle="{{({width:'116rpx',height:'46rpx',lineHeight:'46rpx',fontSize:'24rpx',backgroundColor:themeColor,color:'#fff',border:'none',paddingTop:'8rpx'})}}" hair-line="{{false}}" shape="circle" data-event-opts="{{[['^click',[['chooseSpec']]]]}}" bind:click="__e" bind:__l="__l" vue-slots="{{['default']}}">选规格</u-button></view></view></view></view><view class="u-m-t-24"><view class="u-m-l-48 nr">详情</view><view class="bg-white mx24 px24 u-m-t-24 u-padding-top-20 u-padding-bottom-20 br24"><u-image vue-id="73adca00-6" src="{{cloudPath+'img/banner.png'}}" height="600" bind:__l="__l"></u-image></view></view><view class="u-m-t-24"><view class="u-m-l-48 nr">购买须知</view><view class="bg-white mx24 px24 u-m-t-24 u-padding-top-20 u-padding-bottom-20 br24">这里是购买须知的内容</view></view></view><view class="fixed bg-white row-between px48 u-padding-top-20 u-padding-bottom-20"><view class="column u-text-center"><view class="row-center"><u-image vue-id="73adca00-7" src="{{cloudPath+'img/icon_store.png'}}" width="48" height="48" bind:__l="__l"></u-image></view><view>门店</view></view><view class="u-m-l-64 flex1"><u-button vue-id="73adca00-8" hover-class="none" customStyle="{{({height:'92rpx',fontSize:'24rpx',backgroundColor:themeColor,color:'#fff',border:'none',paddingTop:'8rpx'})}}" hair-line="{{false}}" shape="circle" data-event-opts="{{[['^click',[['onBuy']]]]}}" bind:click="__e" bind:__l="__l" vue-slots="{{['default']}}">立即购买</u-button></view></view><shop-spec bind:close="__e" bind:input="__e" vue-id="73adca00-9" value="{{showSpec}}" data-event-opts="{{[['^close',[['e0']]],['^input',[['__set_model',['','showSpec','$event',[]]]]]]}}" bind:__l="__l"></shop-spec></view>
<view><view class="shop"><view><u-swiper vue-id="73adca00-1" list="{{goods.goods_image}}" name="uri" height="500" border-radius="0" mode="number" indicator-pos="bottomRight" bind:__l="__l"></u-swiper></view><view class="bg-white mx24 px24 u-m-t-24 u-padding-top-20 u-padding-bottom-20 br24"><view class="nr">{{goods.name}}</view><view class="mt10 row u-row-between"><view class="row"><view class="primary"><price-format vue-id="73adca00-2" price="{{goods.min_price}}" subscriptSize="{{22}}" firstSize="{{34}}" secondSize="{{26}}" bind:__l="__l"></price-format></view><view class="sale u-text-center primary u-m-l-12">0折</view><view class="primary u-m-l-12"><price-format vue-id="73adca00-3" lineThrough="{{true}}" color="#999" subscriptSize="{{22}}" firstSize="{{22}}" secondSize="{{22}}" price="{{goods.market_price}}" bind:__l="__l"></price-format></view></view><view class="text-999">已售66</view></view><view class="u-m-t-20 u-m-b-20"><u-line vue-id="73adca00-4" color="#eee" bind:__l="__l"></u-line></view><view><view><text>须知</text><text class="text-999 ml20">周一至周日可用</text></view><view class="row-between mt20"><view><text>保障</text><text class="text-999 ml20">随时退 过期自动退</text></view><view><u-button vue-id="73adca00-5" hover-class="none" customStyle="{{({width:'116rpx',height:'46rpx',lineHeight:'46rpx',fontSize:'24rpx',backgroundColor:themeColor,color:'#fff',border:'none',paddingTop:'8rpx'})}}" hair-line="{{false}}" shape="circle" data-event-opts="{{[['^click',[['e0']]]]}}" bind:click="__e" bind:__l="__l" vue-slots="{{['default']}}">选规格</u-button></view></view></view></view><view class="u-m-t-24"><view class="u-m-l-48 nr">详情</view><view class="bg-white mx24 px24 u-m-t-24 u-padding-top-20 u-padding-bottom-20 br24"><u-image vue-id="73adca00-6" src="{{cloudPath+'img/banner.png'}}" height="600" bind:__l="__l"></u-image></view></view><view class="u-m-t-24"><view class="u-m-l-48 nr">购买须知</view><view class="bg-white mx24 px24 u-m-t-24 u-padding-top-20 u-padding-bottom-20 br24">这里是购买须知的内容</view></view></view><view class="fixed bg-white row-between px48 u-padding-top-20 u-padding-bottom-20"><view class="column u-text-center"><view class="row-center"><u-image vue-id="73adca00-7" src="{{cloudPath+'img/icon_store.png'}}" width="48" height="48" bind:__l="__l"></u-image></view><view>门店</view></view><view class="u-m-l-64 flex1"><u-button vue-id="73adca00-8" hover-class="none" customStyle="{{({height:'92rpx',fontSize:'24rpx',backgroundColor:themeColor,color:'#fff',border:'none',paddingTop:'8rpx'})}}" hair-line="{{false}}" shape="circle" data-event-opts="{{[['^click',[['onBuy']]]]}}" bind:click="__e" bind:__l="__l" vue-slots="{{['default']}}">立即购买</u-button></view></view><shop-spec vue-id="73adca00-9" spec="{{goods.goods_spec}}" value="{{showSpec}}" data-event-opts="{{[['^close',[['e1']]],['^confirm',[['confirmSpec']]],['^input',[['__set_model',['','showSpec','$event',[]]]]]]}}" bind:close="__e" bind:confirm="__e" bind:input="__e" bind:__l="__l"></shop-spec></view>