Authored by Tao

add news & newsDetail none Data

... ... @@ -87,8 +87,11 @@ export default {
goProductList(item) {
let query = {};
let key = item.linkType;
if(key){
query[key] = item.id;
}
// console.log('===category=='+key);
query[key] = item.id;
this.$router.push({
name: 'List',
query,
... ...
... ... @@ -70,7 +70,7 @@ export default {
},
page: 1,
modalLoad: false,
pageSize: 20,
pageSize: 50,
};
},
asyncData({store, router}) {
... ... @@ -87,7 +87,6 @@ export default {
...mapMutations(['MERGE_CHANGEPRICE_DATA']),
...mapActions(['fetchProduct', 'postNoSale', 'postChangePrice']),
async onPullingUp() {
/*
const beginCount = this.skcs.length;
const result = await this.fetchProduct({
... ... @@ -95,6 +94,8 @@ export default {
page: this.page + 1,
pageSize: this.pageSize
});
console.log(result);
const afterCount = this.skcs.length;
if (afterCount > beginCount) {
... ... @@ -103,7 +104,6 @@ export default {
const noMore = get(result, 'data.data', []).length;
this.$refs.scroll.forceUpdate(noMore > 0);
*/
},
onPullingDown() {
... ... @@ -142,7 +142,7 @@ export default {
params: {
productId: this.productInfo.productId
}
})
});
},
onChangePrice(skc) {
this.$refs.modalPrice.show({skc, product: this.productInfo});
... ... @@ -205,9 +205,9 @@ export default {
<style lang="scss" scoped>
.order-page {
position: absolute;
position: relative;
width: 100%;
height: 100%;
/*height: 100%;*/
-webkit-font-smoothing: antialiased;
.title {
... ...
... ... @@ -8,9 +8,10 @@ export default {
* @param productId
* @param page
* @param refresh
* @param pageSize
* @returns {Promise<void>}
*/
async fetchProduct({commit}, {productId, page = 1, refresh = false}) {
async fetchProduct({commit}, {productId, page = 1, pageSize = 50, refresh = false}) {
commit(Types.FETCH_ORDER_PRODUCT_REQUEST);
let result;
... ... @@ -19,7 +20,8 @@ export default {
const results = await Promise.all(Array.from(new Array(page)).map((v, i) => {
return this.$api.get('/api/ufo/seller/entryGoodsSizeList', {
productId,
page: i + 1
page: i + 1,
limit: pageSize
});
}));
... ... @@ -33,11 +35,12 @@ export default {
} else {
result = await this.$api.get('/api/ufo/seller/entryGoodsSizeList', {
productId,
page
page,
limit: pageSize
});
}
// console.log(result);
console.log(result);
if (result && result.code === 200) {
commit(Types.FETCH_ORDER_PRODUCT_SUCCESS, {
... ...