diff --git a/api/model/index.js b/api/model/index.js index 04628a2..b294de3 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -11,13 +11,13 @@ const api = { queryGoodsList: { url: '/teambuy/goods/queryGoodsList', method: 'GET', - limit: 500, + limit: 500 }, // 商品信息- 查询商品信息详情 queryGoodsById: { url: '/teambuy/goods/queryGoodsById', method: 'GET', - limit: 500, + limit: 500 }, } diff --git a/api/model/order.js b/api/model/order.js index 18f88fe..7c40f78 100644 --- a/api/model/order.js +++ b/api/model/order.js @@ -56,12 +56,12 @@ const api = { limit: 500 }, - // 订单-创建订单2 - createOrder2: { - url: '/teambuy/order/createOrder2', - method: 'POST', - limit: 500 - }, + // // 订单-创建订单2 + // createOrder2: { + // url: '/teambuy/order/createOrder2', + // method: 'POST', + // limit: 500 + // }, // 订单-修改团员订单状态 updateMemberOrderById: { diff --git a/components/product/productItem.vue b/components/product/productItem.vue index d157f7f..5385e3c 100644 --- a/components/product/productItem.vue +++ b/components/product/productItem.vue @@ -109,7 +109,7 @@ - + 立即下单 @@ -140,23 +140,21 @@ return { } }, - mounted() { - console.log('商品项数据:', this.item); - }, methods: { // 购买商品(创建订单) - purchase(id) { - this.$api('getRiceProductDetail', { - id - }, res => { - if (res.code == 200) { - res.result.num = 1 - this.$store.commit('setPayOrderProduct', [ - res.result - ]) - this.$utils.navigateTo('/pages_order/order/createOrder') - } - }) + purchase() { + // this.$api('createOrder', { + // id + // }, res => { + // if (res.code == 200) { + // res.result.num = 1 + // this.$store.commit('setPayOrderProduct', [ + // res.result + // ]) + // this.$utils.navigateTo('/pages_order/order/createOrder') + // } + // }) + this.$emit('purchase') }, // 加入购物车 addCart(item){ @@ -186,9 +184,6 @@ return price >= 0 ? price : item.price } }, - onload() { - console.log(props.item); - } } diff --git a/config.js b/config.js index b02ca57..e15a57d 100644 --- a/config.js +++ b/config.js @@ -6,7 +6,7 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI); // 当前环境 -const type = 'local' +const type = 'test' // 环境配置 diff --git a/mixins/list.js b/mixins/list.js index 8486d17..149d26b 100644 --- a/mixins/list.js +++ b/mixins/list.js @@ -24,7 +24,7 @@ export default { pageSize: 10, }, total : 0, - list : [], + list : [] } }, // 下拉刷新 @@ -36,9 +36,10 @@ export default { this.loadMoreData() }, // 页面显示时加载数据 - onShow() { + onShow() { this.getData() }, + // 去掉 方便在组件中再使用 方便 只读对应list methods: { /** * 获取列表数据 @@ -51,8 +52,10 @@ export default { return console.error('mixinsListApi 缺失'); } uni.showLoading({ - title: '加载中...' + title: '加载列表中...' }) + console.log('6666', query(this, queryParams)); + this.$api(this.mixinsListApi, query(this, queryParams), res => { uni.stopPullDownRefresh() diff --git a/pages/index/cart.vue b/pages/index/cart.vue index 79ddac0..5fb240b 100644 --- a/pages/index/cart.vue +++ b/pages/index/cart.vue @@ -111,8 +111,6 @@ export default { this.$api('queryShopcarList', {}, res => { if (res.code == 200){ this.cartData = res.result - console.log(this.cartData); - } }) }, @@ -221,7 +219,7 @@ export default { // }, 800) // } }, - onLoad(){ + onShow(){ this.getCartData() } } diff --git a/pages/index/category.vue b/pages/index/category.vue index 24fbed6..a2e4739 100644 --- a/pages/index/category.vue +++ b/pages/index/category.vue @@ -1,3 +1,5 @@ +const DEFAULT_OPEN = 1 +