Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangwenxue
5 years ago
Commit
3b6497d7adfa8009cef9778cbd7477fd2cca1b63
1 parent
d1a2f3c7
fix(商品详情): fix #6176
6176 【前端ufo】【闲鱼合作】商品详情页面,出售弹窗,没有前端添加出售尺码的功能 调整接口
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
12 deletions
apps/pages/product/components/size-list.vue
apps/pages/product/components/size-request-sheet.vue
apps/pages/product/product-detail.vue
apps/store/product/actions.js
config/product-api-map.js
apps/pages/product/components/size-list.vue
View file @
3b6497d
...
...
@@ -34,8 +34,7 @@ export default {
name: 'size-list',
props: {
list: {
type: [Array, null],
required: true,
type: Array,
},
addSize: {
type: Boolean,
...
...
apps/pages/product/components/size-request-sheet.vue
View file @
3b6497d
...
...
@@ -37,6 +37,11 @@ const { mapActions } = createNamespacedHelpers('product');
export default {
name: 'SizeRequest',
mixins: [stateShortCutsMixins],
props: {
productId: {
type: Number,
},
},
components: {
LayoutApp,
SizeList,
...
...
@@ -78,9 +83,10 @@ export default {
}
},
_requestSize() {
const sizeIds = this.selected.map(item => item.size_id).join(',');
const size_ids = this.selected.map(item => item.size_id).join(',');
const goods_id = this.productDetail.goods_list[0].goods_id;
this.requestSize({
sizeIds
}).then(() => {
this.requestSize({
product_id: this.productId, goods_id, size_ids
}).then(() => {
this.$createDialog({
type: 'alert',
content: '您的尺码添加申请已提交,我们会尽快审核并通知您,请耐心等待',
...
...
apps/pages/product/product-detail.vue
View file @
3b6497d
...
...
@@ -80,7 +80,7 @@
@hidden="onSizeSelectSheetHidden"
@select="onSelectTradeProduct"
@add="onRequestSize"/>
<size-request-sheet v-if="showSizeRequestSheet" @hidden="onSizeRequestHidden"/>
<size-request-sheet v-if="showSizeRequestSheet" @hidden="onSizeRequestHidden"
:productId="productId"
/>
<buy-sheet v-if="showBuySheet" @hidden="onBuyHidden" :productId="productId"/>
</div>
</template>
...
...
@@ -381,9 +381,6 @@ export default {
qiugou() {
this.showBuySheet = true;
},
onBuyHidden() {
this.showBuySheet = false;
},
},
};
</script>
...
...
apps/store/product/actions.js
View file @
3b6497d
...
...
@@ -103,13 +103,13 @@ export default {
resetSelectedSize
({
commit
})
{
commit
(
Types
.
RESET_SELECTED_PRODUCT_SIZE
);
},
async
requestSize
({
state
},
{
sizeI
ds
})
{
async
requestSize
({
state
},
{
product_id
,
goods_id
,
size_i
ds
})
{
const
selectedProduct
=
state
.
selectedProductInfo
;
await
this
.
$api
.
get
(
'/api/ufo/product/addsize'
,
{
product_id
:
selectedProduct
.
productId
,
goods_id
:
get
(
selectedProduct
.
product
,
'goods_list[0].goods_id'
),
size_ids
:
sizeIds
product_id
,
goods_id
,
size_ids
,
});
// 忽略错误
...
...
config/product-api-map.js
View file @
3b6497d
...
...
@@ -68,6 +68,19 @@ module.exports = {
},
},
// 建议尺码
'/api/ufo/product/addsize'
:
{
ufo
:
true
,
auth
:
true
,
path
:
'/ufo-gateway/ufoLive'
,
api
:
'ufo.product.addSize'
,
params
:
{
product_id
:
{
type
:
Number
},
// 商品id
goods_id
:
{
type
:
Number
},
// 商品id
size_ids
:
{
type
:
String
},
// 建议尺码id
},
},
// 推荐
'/api/ufo/product/recommend'
:
{
ufo
:
true
,
...
...
Please
register
or
login
to post a comment