diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java index 541cd0f0e..d9f7775c7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java @@ -141,8 +141,8 @@ public class LJStoreController extends BaseController { * @return */ @GetMapping("selectByStoreId") - List selectByStoreId(Integer chainStoreId){ - return storeService.selectByStoreId(chainStoreId); + public ResponseObject selectByStoreId(Integer chainStoreId){ + return getSuccessResult(storeService.selectByStoreId(chainStoreId)); } // /** diff --git a/gasStation-uni/pagesHome/MyCard/MyCard.vue b/gasStation-uni/pagesHome/MyCard/MyCard.vue index e6bde6506..646b619c4 100644 --- a/gasStation-uni/pagesHome/MyCard/MyCard.vue +++ b/gasStation-uni/pagesHome/MyCard/MyCard.vue @@ -53,7 +53,7 @@ --> - + 车队名称 diff --git a/gasStation-uni/pagesHome/certificate/details.vue b/gasStation-uni/pagesHome/certificate/details.vue index d1cc2bb6c..6bcbda05f 100644 --- a/gasStation-uni/pagesHome/certificate/details.vue +++ b/gasStation-uni/pagesHome/certificate/details.vue @@ -2,47 +2,42 @@ - - + + + - 50元优惠券 - 最低消费500元 + {{couponInfo.name}} + {{couponInfo.useCondition}} - 兑换券 - 剩余3张 + 代金券 + 兑换券 + 折扣券 + 油品立减券 + 单品代金券 + 剩余{{ couponInfo.tfGetNum ? (couponInfo.tfTotal - couponInfo.tfGetNum) : couponInfo.tfTotal}}张 - - 兑换数量 - - - - 兑换内容 - 本兑换券为一次性使用券,持有人凭此券可在指定兑换 - 点免费兑换一瓶可口可乐经典口味瓶装饮料(规格为 - 300毫升)。此券仅限兑换同等价值商品,不找零,不 - 兑换现金,不可与其他优惠活动同时使用。 - 使用须知 - 有效期:领取后3天内有效 - - - 兑换方式 - 门店自提 + 有效期:领取后{{couponInfo.validityDay || 0}}天内有效 + 领取说明: + 1、每人限领{{couponInfo.getNumLimit || 0}}张 + 2、每日限领{{couponInfo.dayGetLimit || 0}}张 + 核销说明: + 核销说明: 适用门店 - + 导航 - 中建锦绣广场二期站 - 山东省济南市槐荫区 | 3.0km + {{store.name}} + {{store.address}} | {{distance}}km @@ -60,20 +55,104 @@ data() { return { value: 0, - certificateId:'' + certificateId: '', + couponInfo: {}, + AppToken: uni.getStorageSync("App-Token"), + // 当前经度信息 + longitude: "", + // 当前纬度信息 + latitude: "", + // 店铺经度信息 + lon: "", + // 店铺纬度信息 + lat: "", + // 店铺信息 + store: { + name: "测试油站", + description: "济南分店", + address: "济南槐荫区" + }, + distance: 0, } }, + onLoad(e) { + this.certificateId = e.certificateId + this.getInfo() + this.getAddress(uni.getStorageSync("storeId")) + }, methods: { - getInfo(){ + goGoGo() { + let lat = Number(this.lat) + let lon = Number(this.lon) + uni.openLocation({ + latitude: lat, + longitude: lon, + name: this.store.name, + address: this.store.address, + + success: function() { + console.log('success'); + }, + complete: function(res) { + console.log(res); + } + }); + }, + // 获取当前位置 + getAddress(storeId) { + let _this = this; + uni.getLocation({ + // 谷歌使用wgs84 其他使用gcj02 + type: 'gcj02', // 使用国测局坐标系 + success: function(res) { + if (_this.longitude == "" && _this.latitude == "") { + + _this.longitude = res.longitude; + _this.latitude = res.latitude + } + console.log('经度: ' + _this.longitude); + console.log('纬度: ' + _this.latitude); + request({ + url: 'business/storeInformation/store/recentlyStore', + method: 'post', + data: { + "lon": _this.longitude, + "lat": _this.latitude, + "storeId": storeId, + "isLogin": _this.AppToken ? "0" : "1", // 0为登录 + + }, + }).then((response) => { + if (response.data.store) { + _this.distance = (Math.ceil(response.data.distance)) + .toFixed(1) + _this.store = response.data.store + + _this.lon = _this.store.longitude + _this.lat = _this.store.latitude + console.log(_this.store, 129); + } else { + uni.showToast({ + title: "当前店铺已关闭!!!", + icon: "none" + }) + } + + }).catch(err => {}) + }, + fail: function(err) { + console.log('获取位置信息失败: ' + err.errMsg); + } + }); + }, + getInfo() { request({ - url: '/cardCoupon/'+this.certificateId, + url: '/cardCoupon/' + this.certificateId, method: 'get', - params: this.queryParams }).then(res => { - console.log(res,66); + console.log(res, 74); if (res.code == 200) { - this.list = res.data.records - this.total = res.data.total + this.couponInfo = res.data } }) }, @@ -170,4 +249,4 @@ display: flex; align-items: center; } - + \ No newline at end of file diff --git a/gasStation-uni/pagesHome/certificate/index.vue b/gasStation-uni/pagesHome/certificate/index.vue index 3b6871a30..4270c0c92 100644 --- a/gasStation-uni/pagesHome/certificate/index.vue +++ b/gasStation-uni/pagesHome/certificate/index.vue @@ -2,10 +2,11 @@ - + {{item.storeName}}可用 - + + {{item.name}} @@ -74,9 +75,9 @@ url: '/pagesMy/integral/integral' }) }, - goDetails() { + goDetails(id) { uni.navigateTo({ - url: '/pagesHome/certificate/details' + url: '/pagesHome/certificate/details?certificateId='+id }) } } diff --git a/gasStation-uni/pagesMy/fleetInfo/index.vue b/gasStation-uni/pagesMy/fleetInfo/index.vue index dce3d18d6..d9e1cd790 100644 --- a/gasStation-uni/pagesMy/fleetInfo/index.vue +++ b/gasStation-uni/pagesMy/fleetInfo/index.vue @@ -10,13 +10,14 @@ *开户门店 - + {{storeName || '暂未选择'}} + - + *开户类型 - + {{fleetInfo.cardType}} @@ -32,7 +33,7 @@ - + 添加管理员 @@ -59,14 +60,20 @@ value: "xxxxxx", value1: true, show: false, - columns: [], + columns: [ + ['储值卡', '囤油卡'] + ], // 员工列表信息 staffList: [], - fleetInfo:{}, + fleetInfo: { + cardType: '储值卡' + }, + storeName: '', + storeList: [] } }, onShow() { - this.getStaffList(uni.getStorageSync("storeId")) + this.getStoreList() }, onPullDownRefresh() { //下拉刷新 @@ -84,16 +91,23 @@ }, methods: { - // 获取当前店铺员工信息列表 - getStaffList(storeId) { - this.columns = [] - let _this = this; + getStoreList() { request({ - url: "business/member/staff/queryList1/" + storeId, + url: '/business/storeInformation/store/selectByStoreId', method: 'get', - }).then((res) => { - _this.staffList = res.data - _this.columns.push(_this.staffList) + params: { + chainStoreId: uni.getStorageSync("chainStoreId"), + } + }).then(res => { + if (res.code == 200) { + this.storeList = res.data + this.storeList.forEach(item => { + if (item.id == uni.getStorageSync("storeId")){ + this.storeName = item.name + } + }) + } + console.log(res, '105'); }) }, cancel() {