This commit is contained in:
@QQNZX 2024-03-04 18:52:33 +08:00
parent 0264b284a3
commit 4237f313e8
5 changed files with 110 additions and 72 deletions

View File

@ -8,9 +8,10 @@ export function issueCardFavorable(data) {
data:data data:data
}) })
} }
export function getCardFavorableLists(status) { export function getCardFavorableLists(status) {
return request({ return request({
url: 'business/marketingActivity/cardFavorableRecord/getCardFavorableLists', url: 'business/marketingActivity/oneActiveOneCoupon',
method: 'get', method: 'get',
params: status params: status
}) })

View File

@ -3,9 +3,9 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8081/', // baseUrl: 'http://192.168.0.196:8081/',
// baseUrl: 'http://192.168.1.4:8080/', // baseUrl: 'http://www.nuoyunr.com/lananRsc/',
baseUrl: 'http://192.168.0.121:8080/', baseUrl: 'http://192.168.0.196:8081/',

View File

@ -61,20 +61,18 @@
<!-- centenr --> <!-- centenr -->
<view class="conttainer-cetr"> <view class="conttainer-cetr">
<view class="conttainer-title">今日会员价</view> <view class="conttainer-title">今日会员价</view>
<view class="conttainer-box"> <view class="conttainer-box" v-for="(item,index) in oilTypeList" :key="index">
<view class="c-box-box1" @click="show = true"> <view class="c-box-box1">
<view class="">{{oilInfo.oilName}}</view> <view class="">{{item.oilName||''}}</view>
<view class="">
<u-icon name="arrow-down-fill"></u-icon>
</view>
</view> </view>
<view class="c-box-box2"> <view class="c-box-box2">
<view class="xred">会员价</view> <view class="xred">会员价</view>
<view class="dred"> <text class="xred"></text> {{oilInfo.oilPrice}}</view> <view class="dred"> <text class="xred"></text> {{item.oilPrice||0}}</view>
</view> </view>
<view class="c-box-box3"> <view class="c-box-box3">
<view class="xblck">国标价</view> <view class="xblck">国标价</view>
<view class="dblck"> <text class="xblck"></text> {{oilInfo.gbPrice}}</view> <view class="dblck"> <text class="xblck"></text> {{item.gbPrice||0}}</view>
</view> </view>
</view> </view>
@ -87,7 +85,8 @@
<view class="station-title" style="display: flex;justify-content: space-between;"> <view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}} {{store.name}}{{store.description ? "("+store.description+")" : ""}}
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;"> <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view> <view style="font-size: 12px;">切换位置 <uni-icons type="right" color="#304fff"
size="14"></uni-icons> </view>
</view> </view>
</view><!--顺通石化加油站(工业南路站)--> </view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;"> <view style="display: flex;">
@ -114,7 +113,7 @@
<view style="height: 88px; width: 100%;"></view> <view style="height: 88px; width: 100%;"></view>
</view> </view>
<!-- 加油站卡片结束--> <!-- 加油站卡片结束-->
<!-- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> -->
<u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false" <u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false"
keyName="label"></u-picker> keyName="label"></u-picker>
<u-overlay :show="shows == true"> <u-overlay :show="shows == true">
@ -239,7 +238,7 @@
// await this.getOilType(); // await this.getOilType();
} }
await this.getTheJudgmentIsTheSame(); await this.getTheJudgmentIsTheSame();
}else{ } else {
await this.getUserAuthority(); await this.getUserAuthority();
// await this.getOilType(); // await this.getOilType();
await this.getTheJudgmentIsTheSame(); await this.getTheJudgmentIsTheSame();
@ -278,7 +277,7 @@
method: 'get', method: 'get',
}).then(res => { }).then(res => {
_this.list1 = res.data _this.list1 = res.data
if (res.data.length>0){ if (res.data.length > 0) {
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
if (res.data[i].bannerUrl.includes("http")) { if (res.data[i].bannerUrl.includes("http")) {
_this.list1[i].bannerUrl = res.data[i].bannerUrl _this.list1[i].bannerUrl = res.data[i].bannerUrl
@ -391,7 +390,7 @@
}, },
// tokenid // tokenid
async getTheJudgmentIsTheSame() { async getTheJudgmentIsTheSame() {
console.log(this.AppToken,547); console.log(this.AppToken, 547);
// //
if (!this.AppToken) { if (!this.AppToken) {
return; return;
@ -410,7 +409,7 @@
// code // code
if (uni.getStorageSync("appltType")== "WECHAT") { if (uni.getStorageSync("appltType") == "WECHAT") {
wx.login({ wx.login({
success(res) { success(res) {
if (res.code) { if (res.code) {
@ -433,7 +432,7 @@
}) })
} }
if (uni.getStorageSync("appltType")== "ALIPAY") { if (uni.getStorageSync("appltType") == "ALIPAY") {
my.getAuthCode({ my.getAuthCode({
scopes: 'auth_base', scopes: 'auth_base',
success: res => { success: res => {
@ -447,7 +446,7 @@
storeId: uni.getStorageSync("storeId"), storeId: uni.getStorageSync("storeId"),
}, },
}).then((resp) => { }).then((resp) => {
console.log(resp,85412); console.log(resp, 85412);
if (!resp.data) { if (!resp.data) {
uni.removeStorageSync("App-Token"); uni.removeStorageSync("App-Token");
} }
@ -518,11 +517,11 @@
}, },
}).then((response) => { }).then((response) => {
console.log(response,"2154"); console.log(response, "2154");
// uni.showToast({ // uni.showToast({
// title:"121984:"+storeId // title:"121984:"+storeId
// }) // })
if (response.data.store){ if (response.data.store) {
_this.distance = (Math.ceil(response.data.distance)) _this.distance = (Math.ceil(response.data.distance))
.toFixed(1) .toFixed(1)
_this.store = response.data.store _this.store = response.data.store
@ -550,10 +549,10 @@
_this.getIndexBanner() _this.getIndexBanner()
_this.getOilType(); _this.getOilType();
}else{ } else {
uni.showToast({ uni.showToast({
title:"当前店铺已关闭!!!", title: "当前店铺已关闭!!!",
icon:"none" icon: "none"
}) })
} }
@ -594,6 +593,7 @@
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
} }
let oilData = [] let oilData = []
console.log(this.oilTypeList);
this.oilTypeList.forEach(res => { this.oilTypeList.forEach(res => {
let data = { let data = {
id: res.numberId, id: res.numberId,
@ -605,7 +605,7 @@
}) })
this.columns = [oilData] this.columns = [oilData]
console.log("aaa", this.columns)
} }
}) })
}, },
@ -675,8 +675,8 @@
uni.openLocation({ uni.openLocation({
latitude: lat, latitude: lat,
longitude: lon, longitude: lon,
name:this.store.name, name: this.store.name,
address:this.store.address, address: this.store.address,
success: function() { success: function() {
console.log('success'); console.log('success');

View File

@ -10,7 +10,7 @@
<!-- 储值卡 --> <!-- 储值卡 -->
<view class="xyihang"> <view class="xyihang">
<view class="title-hei">储值卡</view> <view class="title-hei">电子储值卡</view>
</view> </view>
<view class="card-cz"> <view class="card-cz">
<view class="card-top"> <view class="card-top">
@ -33,7 +33,7 @@
</view> </view>
<!-- 囤油卡 --> <!-- 囤油卡 -->
<view class="xyihang"> <view class="xyihang">
<view class="title-hei">囤油卡</view> <view class="title-hei">电子囤油卡</view>
<view class="d_dis"> <view class="d_dis">
<view class="" @click="s_()"> <view class="" @click="s_()">
<text>上一张</text> <text>上一张</text>
@ -55,7 +55,7 @@
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between; "> <view style="width: 100%;display: flex;align-items: center;justify-content: space-between; ">
<view class="bai-box"> <view class="bai-box">
<view class="title-card">囤油卡</view> <view class="title-card">电子囤油卡</view>
<view class="">{{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].oilName || '0'}} <view class="">{{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].oilName || '0'}}
</view> </view>
<view>剩余油量{{cardsList[cardsIndex].refuelMoney || '0'}}L</view> <view>剩余油量{{cardsList[cardsIndex].refuelMoney || '0'}}L</view>

View File

@ -3,20 +3,35 @@
<view class="container"> <view class="container">
<view class="my-header"> <view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view> <view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">油卡充值</view> <view class="my-text" v-if="actinput == 0">电子储值卡</view>
<view class="my-text" v-if="actinput == 1">电子囤油卡</view>
<view class="my-text" v-if="actinput == 2">电子礼品卡</view>
<view class="my-icons"></view> <view class="my-icons"></view>
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="tap-box"> <!-- <view class="tap-box">
<view class="box-tap" :class="{ 'act' :actinput == index }" v-for="(item,index) in taplist" :key="index" <view class="box-tap" :class="{ 'act' :actinput == index }" v-for="(item,index) in taplist" :key="index"
@click="getindex(index)"> @click="getindex(index)">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="gang" :class="{ 'actgang' : actinput == index }"></view> <view class="gang" :class="{ 'actgang' : actinput == index }"></view>
</view> </view>
</view> </view> -->
<!-- 储值充值 --> <!-- 储值充值 -->
<view class="boxback" v-if="actinput == 0"> <view class="boxback" v-if="actinput == 0">
<view class="box-cz"> <view class="box_s" v-for="(item,index) in actList" :key="index">
{{item.discountActiveDescribe || ''}}
</view>
<view style="display: flex; align-items: center; justify-content: space-around;">
<view class="" @click="types = 0"> <u-button type="primary" text="自定义金额"></u-button></view>
<view class="" @click="types = 1"> <u-button type="primary" :plain="true" text="金额选项"></u-button>
</view>
</view>
<view class="inputbox" v-if="types == 0">
<view class="cadname" style="width: 38%;">自定义金额</view>
<input type="text" v-model="rechargeBalance" placeholder="请输入自定义金额" />
</view>
<view class="box-cz" v-if="types == 1">
<view class="box-jg" :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardValueList" <view class="box-jg" :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardValueList"
:key="index" :key="index"
@click="xzindex(index,item.rechargeBalance,item.fringeBenefit,item.giftBalance,item.points,item.growthValue,item.count,item.id)"> @click="xzindex(index,item.rechargeBalance,item.fringeBenefit,item.giftBalance,item.points,item.growthValue,item.count,item.id)">
@ -168,6 +183,7 @@
export default { export default {
data() { data() {
return { return {
types: 0,
query: { query: {
storeId: '' storeId: ''
}, },
@ -202,6 +218,7 @@
shuomingList: [], shuomingList: [],
shuomingFList: [], shuomingFList: [],
columns: [], columns: [],
actList: [],
taplist: [{ taplist: [{
title: '储值充值' title: '储值充值'
}, },
@ -242,8 +259,22 @@
}, },
onShow() { onShow() {
this.getStaffList() this.getStaffList()
this.activen()
}, },
methods: { methods: {
activen() {
request({
url: '/business/marketingActivity/cardValue/appletList?storeId=24',
method: 'get',
}).then(res => {
if (res.code == 200) {
console.log(res);
this.actList = res.data
}
})
},
open() { open() {
console.log(); console.log();
}, },
@ -252,13 +283,13 @@
}, },
// //
addFuleCarRecords() { addFuleCarRecords() {
if (this.staffId == '') { // if (this.staffId == '') {
uni.showToast({ // uni.showToast({
title: "员工为必填项", // title: "",
icon: Error // icon: Error
}) // })
return // return
} // }
if (this.carValueId == '') { if (this.carValueId == '') {
uni.showToast({ uni.showToast({
title: "囤油卡为必填项", title: "囤油卡为必填项",
@ -283,7 +314,7 @@
}, },
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log(res,_this.appltType) console.log(res, _this.appltType)
if (_this.appltType == "WECHAT") { if (_this.appltType == "WECHAT") {
let payProvider = "wxpay" let payProvider = "wxpay"
_this.orderInfo = JSON.parse(res.data.reservedPayInfo); _this.orderInfo = JSON.parse(res.data.reservedPayInfo);
@ -354,13 +385,7 @@
}, },
// //
addValueCarRecords() { addValueCarRecords() {
if (this.staffId == '') {
uni.showToast({
title: "员工为必填项",
icon: "error"
})
return
}
if (this.carValueId == '') { if (this.carValueId == '') {
uni.showToast({ uni.showToast({
title: "储值卡为必填项", title: "储值卡为必填项",
@ -380,7 +405,10 @@
storeId: this.storeId, storeId: this.storeId,
chainStoreId: this.chainStoreId, chainStoreId: this.chainStoreId,
cardFavorableId: this.cardFavorableId, cardFavorableId: this.cardFavorableId,
cardRecordId: this.cardRecordId cardRecordId: this.cardRecordId,
rechargeBalance: this.rechargeBalance,
types: this.types
}, },
}).then(res => { }).then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -774,6 +802,7 @@
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 1px; padding-bottom: 1px;
padding-top: 1px;
} }
.box-gang { .box-gang {
@ -805,4 +834,12 @@
background: white; background: white;
overflow: scroll; overflow: scroll;
} }
.box_s {
width: 90%;
display: flex;
margin: 10px auto;
font-size: 14px;
color: #f40000;
}
</style> </style>