This commit is contained in:
cun-nan 2024-09-27 10:20:09 +08:00
parent d0e3751aac
commit 1969b5c0db
5 changed files with 149 additions and 55 deletions

View File

@ -141,8 +141,8 @@ public class LJStoreController extends BaseController {
* @return
*/
@GetMapping("selectByStoreId")
List<LJStore> selectByStoreId(Integer chainStoreId){
return storeService.selectByStoreId(chainStoreId);
public ResponseObject selectByStoreId(Integer chainStoreId){
return getSuccessResult(storeService.selectByStoreId(chainStoreId));
}
// /**

View File

@ -53,7 +53,7 @@
</view> -->
</view>
<view class="card_" @click="goFleetDetails()" v-if="fleetInfo()">
<view class="card_" @click="goDetails('fleet')" v-if="fleetInfo">
<view class="top_card">
<view class="">车队名称</view>
<view class="" @click="goCode()">

View File

@ -3,46 +3,41 @@
<view class="Candywrapper">
<view class="bai-bs">
<view class="">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<image :src="couponInfo.backgroundImage" v-if="couponInfo.backgroundImage" style="width: 60px; height: 60px; "></image>
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image>
</view>
<view class="rr-box">
<view class="title_">50元优惠券</view>
<view style="font-size: 12px;color: #666666;">最低消费500元</view>
<view class="title_">{{couponInfo.name}}</view>
<view style="font-size: 12px;color: #666666;">{{couponInfo.useCondition}}</view>
<view style="width: 100%;display: flex;justify-content: space-between; ">
<view class="red-size">兑换券</view>
<view class="red-size">剩余3张</view>
<view class="red-size" v-if="couponInfo.type==1">代金券</view>
<view class="red-size" v-if="couponInfo.type==2">兑换券</view>
<view class="red-size" v-if="couponInfo.type==3">折扣券</view>
<view class="red-size" v-if="couponInfo.type==4">油品立减券</view>
<view class="red-size" v-if="couponInfo.type==5">单品代金券</view>
<view class="red-size">剩余{{ couponInfo.tfGetNum ? (couponInfo.tfTotal - couponInfo.tfGetNum) : couponInfo.tfTotal}}</view>
</view>
</view>
</view>
<view class="bai-bs">
<view class="title_">兑换数量</view>
<u-number-box v-model="value" @change="valChange"></u-number-box>
</view>
<view class="bai-box">
<view class="title_">兑换内容</view>
<view class="si_">本兑换券为一次性使用券持有人凭此券可在指定兑换
点免费兑换一瓶可口可乐经典口味瓶装饮料规格为
300毫升此券仅限兑换同等价值商品不找零
兑换现金不可与其他优惠活动同时使用</view>
</view>
<view class="bai-box">
<view class="title_">使用须知</view>
<view class="si_">有效期领取后3天内有效</view>
</view>
<view class="bai-box">
<view class="title_">兑换方式</view>
<view class="si_">门店自提</view>
<view class="si_">有效期领取后{{couponInfo.validityDay || 0}}天内有效</view>
<view class="si_">领取说明</view>
<view class="si_">1每人限领{{couponInfo.getNumLimit || 0}}</view>
<view class="si_">2每日限领{{couponInfo.dayGetLimit || 0}}</view>
<view class="si_">核销说明</view>
<view class="si_">核销说明</view>
</view>
<view class="bai-box">
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
<view class="title_">适用门店</view>
<view class="d-s" style="font-size: 14px;color: #FF2828;">
<view class="d-s" style="font-size: 14px;color: #FF2828;" @click="goGoGo()">
<image src="../../static/icon/reddh.png" style="width: 18px; height: 18px; "></image>
导航
</view>
</view>
<view class="si">中建锦绣广场二期站</view>
<view class="si">山东省济南市槐荫区 | 3.0km</view>
<view class="si">{{store.name}}</view>
<view class="si">{{store.address}} | {{distance}}km</view>
</view>
@ -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: '/cardCoupon/'+this.certificateId,
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,
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
}
})
},

View File

@ -2,10 +2,11 @@
<view class="centenr">
<view class="Candywrapper">
<view class="f-box" v-for="(item,index) in list" :key="index" @click="goDetails()">
<view class="f-box" v-for="(item,index) in list" :key="index" @click="goDetails(item.id)">
<view class="f-top">{{item.storeName}}可用</view>
<view class="f-bs">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<image :src="item.backgroundImage" v-if="item.backgroundImage" style="width: 60px; height: 60px; "></image>
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image>
<view class="r-box">
<view class="">
<view class="m_">{{item.name}}</view>
@ -74,9 +75,9 @@
url: '/pagesMy/integral/integral'
})
},
goDetails() {
goDetails(id) {
uni.navigateTo({
url: '/pagesHome/certificate/details'
url: '/pagesHome/certificate/details?certificateId='+id
})
}
}

View File

@ -10,13 +10,14 @@
<view class="box-hang">
<view class=""><span style="color: red;">*</span>开户门店</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
<text>{{storeName || '暂未选择'}}</text>
<u-icon name="arrow-right" size="14"></u-icon>
</view>
</view>
<view class="box-hang">
<view class="box-hang" @click="show = !show">
<view class=""><span style="color: red;">*</span>开户类型</view>
<view class="dis">
<input v-model="value" style="text-align: right;"></input>
<text>{{fleetInfo.cardType}}</text>
</view>
</view>
<view class="box-hang" style="margin-top: 10px;">
@ -32,7 +33,7 @@
<image style="width: 24px;height: 24px;margin-left: 5px;" src="@/static/my/fleetRemove.png"></image>
</view>
</view>
<view class="box-end" @click="show = !show">
<view class="box-end">
<image style="width: 15px;height: 15px;margin-right: 5px;margin-top: 6px;"
src="@/static/my/fleetAdd.png"></image>
<text>添加管理员</text>
@ -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() {