diff --git a/gasStation-uni/pagesHome/PointsMall/PointsMall.vue b/gasStation-uni/pagesHome/PointsMall/PointsMall.vue index 0697092de..35d6059d6 100644 --- a/gasStation-uni/pagesHome/PointsMall/PointsMall.vue +++ b/gasStation-uni/pagesHome/PointsMall/PointsMall.vue @@ -61,8 +61,7 @@ - + {{item.giftName}} @@ -109,7 +108,9 @@ title: '', qhindex: -1, baseUrl: config.baseUrl, + storeId: uni.getStorageSync('storeId'), query: { + storeId: uni.getStorageSync('storeId'), categoryId: '', giftName: '', deliveryMethod: '', @@ -143,19 +144,21 @@ // 获取积分商城分类 getCategoryList() { request({ - url: 'business/integral/integralGiftCategory/queryByPage', + url: 'business/integral/integralGiftCategory/queryListByStoreId', method: 'get', - + params: { + storeId: this.storeId + } }).then((res) => { if (res.code == 200) { - this.categoryList = res.data.records + this.categoryList = res.data } }) }, // 获取积分商城列表 getIntegralGiftList() { request({ - url: 'business/integral/integralGift/queryByPage', + url: 'business/integral/integralGift/queryByPageByStoreId', method: 'get', params: this.query }).then((res) => { diff --git a/gasStation-uni/pagesHome/editress/editress.vue b/gasStation-uni/pagesHome/editress/editress.vue index 80df0ba1f..8a93845ff 100644 --- a/gasStation-uni/pagesHome/editress/editress.vue +++ b/gasStation-uni/pagesHome/editress/editress.vue @@ -57,6 +57,7 @@ } }, onLoad() { + this.dataForm = {} uni.$on('addressInfo', (data) => { if (data != null) { this.dataForm = data @@ -68,8 +69,6 @@ } }) uni.$emit('unAddressInfo') - - }, components: { diff --git a/gasStation-uni/pagesHome/order/order.vue b/gasStation-uni/pagesHome/order/order.vue index 9e7ed14b1..67cac1e59 100644 --- a/gasStation-uni/pagesHome/order/order.vue +++ b/gasStation-uni/pagesHome/order/order.vue @@ -327,9 +327,11 @@ // 根据storeid 查找店铺信息 getStroeById() { request({ - url: 'business/storeInformation/store', + url: 'business/storeInformation/store/storeInfoUni', method: 'get', - // params:{} + params: { + storeId: uni.getStorageSync('storeId') + } }).then((res) => { if (res.code == 200) { this.myPoints = res.data.points diff --git a/gasStation-uni/pagesLogin/login/login.vue b/gasStation-uni/pagesLogin/login/login.vue index cb4953865..51df2e569 100644 --- a/gasStation-uni/pagesLogin/login/login.vue +++ b/gasStation-uni/pagesLogin/login/login.vue @@ -87,12 +87,16 @@ uni.setStorageSync('App-Token', rex.data.data .token); + uni.setStorageSync('chainStoreId', rex.data + .data + .chainStoreId); + uni.navigateTo({ url: '/pages/index/index' }) } console.log("swq", uni.getStorageSync( - 'App-Token')); + 'App-Token')); }, fail: (res) => { console.log("fail", res); diff --git a/gasStation-uni/pagesMy/integral/integral.vue b/gasStation-uni/pagesMy/integral/integral.vue index 362b37cfc..a07799820 100644 --- a/gasStation-uni/pagesMy/integral/integral.vue +++ b/gasStation-uni/pagesMy/integral/integral.vue @@ -14,9 +14,12 @@ 我的积分 {{myPoints}} - + 积分签到 + + 已签到 + @@ -51,7 +54,8 @@ return { title: '', myPoints: 0, // 我的积分 - + flag: true, + storeId: uni.getStorageSync('storeId') } }, @@ -60,6 +64,7 @@ }, onShow() { this.getUserInfoList(); + this.getTodayIsSignIn(); }, methods: { // 查询我的积分 @@ -83,9 +88,44 @@ uni.navigateBack() }, - // 先查询今天是否签到过 - login() { + getTodayIsSignIn() { + request({ + url: 'business/integral/integralSettings/todayIsSignIn', + method: 'get', + params: { + storeId: this.storeId + } + }).then((res) => { + if (res.code == 200) { + if (res.data != 0) { + this.flag = false + } else { + this.flag = true + } + } + }) + }, + // 先查询今天是否签到过 + sign() { + let integralSettings = { + storeId: this.storeId + } + request({ + url: 'business/integral/integralSettings/signInFunction', + method: 'post', + data: integralSettings + }).then((res) => { + if (res.code == 200) { + // 签到成功 + uni.showToast({ + title: '标题', + duration: 2000 + }); + this.getUserInfoList(); + this.getTodayIsSignIn(); + } + }) } } }