diff --git a/apis/interfaces/order.js b/apis/interfaces/order.js index 8ce7bfb..387c123 100644 --- a/apis/interfaces/order.js +++ b/apis/interfaces/order.js @@ -17,6 +17,14 @@ const buy = (data, method) => { }) } -export { - buy +// eb支付 +const eb = (no) => { + return request({ + url: 'mall/pay/' + no + '/eb', + }) +} + +export { + buy, + eb } diff --git a/manifest.json b/manifest.json index 2eafb16..13d44d0 100644 --- a/manifest.json +++ b/manifest.json @@ -25,7 +25,8 @@ "modules" : { "OAuth" : {}, "Payment" : {}, - "Share" : {} + "Share" : {}, + "Geolocation" : {} }, /* 应用发布信息 */ "distribute" : { @@ -40,7 +41,6 @@ "", "", "", - "", "", "", "", @@ -76,7 +76,8 @@ } }, "maps" : {}, - "ad" : {} + "ad" : {}, + "geolocation" : {} }, "icons" : { "android" : { diff --git a/pages/equity/index.vue b/pages/equity/index.vue index 213d946..d31e2fc 100644 --- a/pages/equity/index.vue +++ b/pages/equity/index.vue @@ -18,7 +18,7 @@ mode="aspectFill" /> {{item.name || '-'}} - 进店 + 进店 @@ -49,16 +49,16 @@ 累计交易{{item.orders || 0}}次 - 进店 + 进店 - {{item.title}} + {{item.title}} - + @@ -193,7 +193,7 @@ console.log(res) this.recommendBus = res.positions this.hotBus = res.hot - this.industryBus = [{title: '全部',}, ...res.industries] + this.industryBus = [{title: '全部', industry_id: ''}, ...res.industries] this.getCompaniesList() }).catch(err => { uni.showToast({ @@ -202,9 +202,16 @@ }) }) }, + // 企业广场行业 + onBusIndustry(index){ + this.industryIndex = index + this.getCompaniesList() + }, // 企业列表 getCompaniesList(){ - companiesList().then(res => { + companiesList({ + industry_id: this.industryBus[this.industryIndex].industry_id + }).then(res => { this.busList = res.data this.busPages = res.pages }) @@ -216,6 +223,11 @@ this.banners = res.banners this.coupons = res.coupons this.position = res.positions + }).catch(err => { + uni.showToast({ + title: err.message, + icon : 'none' + }) }) this.getGoods() }, @@ -233,6 +245,22 @@ // 易货分类 onClassify(){ this.$Router.push({name: 'goodsList'}) + }, + // 打开微信小程序 + onOpenWechat(e){ + plus.share.getServices(res => { + let sweixin = null; + for(let val of res){ + console.log(val) + if(val.id === weixin){ + sweixin = val + return + } + } + sweixin ? sweixin.launchMiniProgram({ + id: e.original_id + }):plus.nativeUI.alert('当前环境不支持微信操作!'); + }) } } } diff --git a/pages/goods/details.vue b/pages/goods/details.vue index ec1f82f..17d10fb 100644 --- a/pages/goods/details.vue +++ b/pages/goods/details.vue @@ -77,6 +77,7 @@ }, created() { goods(this.$Route.query.id || 16).then(res=>{ + console.log(res) this.loding = false this.goodsObj = res this.identity = res.identity.id || '' @@ -95,7 +96,7 @@ name: 'Buy', params: { skuId: this.goodsObj.skus[0].sku_id, - type : this.identity + qty : this.goodsObj.skus[0].number } }) } diff --git a/pages/order/buy.vue b/pages/order/buy.vue index 91cd0fe..a2d3ecd 100644 --- a/pages/order/buy.vue +++ b/pages/order/buy.vue @@ -11,7 +11,7 @@ {{item.title}} {{item.price}} - + @@ -38,7 +38,7 @@ - +