diff --git a/common/js/api.js b/common/js/api.js index ade21d5..0be8890 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -356,5 +356,36 @@ export default { calcUsablePoints(param) { return uni.api.get("/api/points/member-points/calc-usable-points", param); }, - + + /** + * 分享-获取邀请页数据 + * @param {Object} param + */ + getByShopId(param) { + return uni.api.get("/tbShopShare/getByShopId", param); + }, + + /** + * 分享-邀请记录 + * @param {Object} param + */ + shareRecord(param) { + return uni.api.get("/tbShopShare/record", param); + }, + + /** + * 分享-被邀请人进入页面时使用 + * @param {Object} param + */ + shareHeOpen(param) { + return uni.api.post("/tbShopShare/open", param); + }, + + /** + * 分享-被邀请人领取优惠券时使用 + * @param {Object} param + */ + shareReceive(param) { + return uni.api.post("/tbShopShare/receive", param); + }, } \ No newline at end of file diff --git a/components/popupad.vue b/components/popupad.vue index 8960d29..277b66f 100644 --- a/components/popupad.vue +++ b/components/popupad.vue @@ -76,8 +76,9 @@ swiperClick (e) { let item = this.popupadList[e]; if ( item.linkPath ) { - uni.navigateTo({ - url: `${item.linkPath}` + uni.pro.navigateTo(item.linkPath, { + shopId: uni.cache.get('shopId'), + is_type: "me", }) } }, diff --git a/pages/index/indexs.vue b/pages/index/indexs.vue index b6d64ef..7087ae0 100644 --- a/pages/index/indexs.vue +++ b/pages/index/indexs.vue @@ -91,10 +91,6 @@ }) }, memberindex(url) { - // uni.pro.navigateTo("/pagesInviteFriends/index/index", { - // shopId: uni.cache.get('shopId'), - // type: 'index', - // }) uni.pro.navigateTo(url, { shopId: uni.cache.get('shopId'), type: 'index', diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue index ba04a30..62f9d55 100644 --- a/pages/order_food/order_food.vue +++ b/pages/order_food/order_food.vue @@ -238,10 +238,10 @@ - + - + 已下单菜品 @@ -481,6 +481,7 @@ duration: 0 }); if ( this.shopId ) { + this.productqueryShop(); this.productqueryProduct() //list 数据 this.getShopUserInfo() //list 数据 this.handlemessage() //监听websocket返回 diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue index 6ae3f26..8ef77ee 100644 --- a/pages/user/coupon.vue +++ b/pages/user/coupon.vue @@ -17,22 +17,22 @@ + :class="{'containertopboxitemleft_vip': item.type == 2,'containertopboxitemlefts': status != 1,}" > + :class="status == 1?'':'containertopboxitemleft_ones'"> {{item.num || 0}} - {{item.couponsAmount || 0}} + {{item.discountAmount || 0}} {{ item.type == 2 ? item.detail : '优惠券(元)'}} @@ -42,8 +42,9 @@ - - {{ item.shopName }} + + {{ item.shopName }} + {{ item.name }} 无门槛使用 @@ -51,13 +52,13 @@ {{ item.type == 2 ? '会员商品券' : '通用红包券'}} - {{item.status == 0 ? '去使用':'已使用'}} + :class="status == 1?'containertopboxitemright_four containertopboxitemright_btn':'containertopboxitemright_fours containertopboxitemright_btn'"> + {{status == 1 ? '去使用':'已使用'}} - + @@ -133,11 +134,10 @@ * 去使用优惠券 */ navigatorGo ( item ) { - if ( item.type == 2 ) { - uni.pro.navigateTo('/pages/order_food/order_food', { - shopId: item.shopId - }) - } + uni.cache.set('shopId',item.shopId) + uni.pro.navigateTo('/pages/order_food/order_food', { + shopId: item.shopId + }) }, } }; diff --git a/pagesInviteFriends/index/index.vue b/pagesInviteFriends/index/index.vue index f6ec0bc..05b65bd 100644 --- a/pagesInviteFriends/index/index.vue +++ b/pagesInviteFriends/index/index.vue @@ -1,31 +1,31 @@