前端
This commit is contained in:
parent
0264b284a3
commit
4237f313e8
@ -8,9 +8,10 @@ export function issueCardFavorable(data) {
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
export function getCardFavorableLists(status) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardFavorableRecord/getCardFavorableLists',
|
||||
url: 'business/marketingActivity/oneActiveOneCoupon',
|
||||
method: 'get',
|
||||
params: status
|
||||
})
|
||||
|
@ -3,9 +3,9 @@ module.exports = {
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||
|
||||
// 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/',
|
||||
|
||||
|
||||
|
||||
@ -32,4 +32,4 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -61,20 +61,18 @@
|
||||
<!-- centenr -->
|
||||
<view class="conttainer-cetr">
|
||||
<view class="conttainer-title">今日会员价</view>
|
||||
<view class="conttainer-box">
|
||||
<view class="c-box-box1" @click="show = true">
|
||||
<view class="">{{oilInfo.oilName}}</view>
|
||||
<view class="">
|
||||
<u-icon name="arrow-down-fill"></u-icon>
|
||||
</view>
|
||||
<view class="conttainer-box" v-for="(item,index) in oilTypeList" :key="index">
|
||||
<view class="c-box-box1">
|
||||
<view class="">{{item.oilName||''}}</view>
|
||||
|
||||
</view>
|
||||
<view class="c-box-box2">
|
||||
<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 class="c-box-box3">
|
||||
<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>
|
||||
|
||||
@ -87,7 +85,8 @@
|
||||
<view class="station-title" style="display: flex;justify-content: space-between;">
|
||||
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
<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 style="display: flex;">
|
||||
@ -114,7 +113,7 @@
|
||||
<view style="height: 88px; width: 100%;"></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"
|
||||
keyName="label"></u-picker>
|
||||
<u-overlay :show="shows == true">
|
||||
@ -239,7 +238,7 @@
|
||||
// await this.getOilType();
|
||||
}
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
}else{
|
||||
} else {
|
||||
await this.getUserAuthority();
|
||||
// await this.getOilType();
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
@ -278,7 +277,7 @@
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
_this.list1 = res.data
|
||||
if (res.data.length>0){
|
||||
if (res.data.length > 0) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (res.data[i].bannerUrl.includes("http")) {
|
||||
_this.list1[i].bannerUrl = res.data[i].bannerUrl
|
||||
@ -367,21 +366,21 @@
|
||||
uni.getSetting({
|
||||
async success(res) {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
// uni.authorize({
|
||||
// scope: 'scope.userLocation',
|
||||
// success() {
|
||||
// // 用户同意获取位置信息
|
||||
// // _this.isExistStoreId()
|
||||
// },
|
||||
// fail() {
|
||||
// // 用户拒绝
|
||||
// }
|
||||
// })
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
// uni.authorize({
|
||||
// scope: 'scope.userLocation',
|
||||
// success() {
|
||||
// // 用户同意获取位置信息
|
||||
// // _this.isExistStoreId()
|
||||
// },
|
||||
// fail() {
|
||||
// // 用户拒绝
|
||||
// }
|
||||
// })
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
} else {
|
||||
// 用户同意获取位置信息
|
||||
// _this.isExistStoreId()
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
// 用户同意获取位置信息
|
||||
// _this.isExistStoreId()
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
@ -391,7 +390,7 @@
|
||||
},
|
||||
// 判断token是否与当前连锁店id相同
|
||||
async getTheJudgmentIsTheSame() {
|
||||
console.log(this.AppToken,547);
|
||||
console.log(this.AppToken, 547);
|
||||
// 判断是否登录
|
||||
if (!this.AppToken) {
|
||||
return;
|
||||
@ -410,7 +409,7 @@
|
||||
|
||||
|
||||
// 判断当前登录的code是否相同
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
if (uni.getStorageSync("appltType") == "WECHAT") {
|
||||
wx.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
@ -433,7 +432,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (uni.getStorageSync("appltType")== "ALIPAY") {
|
||||
if (uni.getStorageSync("appltType") == "ALIPAY") {
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_base',
|
||||
success: res => {
|
||||
@ -447,7 +446,7 @@
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
},
|
||||
}).then((resp) => {
|
||||
console.log(resp,85412);
|
||||
console.log(resp, 85412);
|
||||
if (!resp.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
@ -518,11 +517,11 @@
|
||||
|
||||
},
|
||||
}).then((response) => {
|
||||
console.log(response,"2154");
|
||||
console.log(response, "2154");
|
||||
// uni.showToast({
|
||||
// title:"121984:"+storeId
|
||||
// })
|
||||
if (response.data.store){
|
||||
if (response.data.store) {
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
@ -546,14 +545,14 @@
|
||||
}
|
||||
|
||||
_this.lon = _this.store.longitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
_this.getIndexBanner()
|
||||
_this.getOilType();
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:"当前店铺已关闭!!!",
|
||||
icon:"none"
|
||||
title: "当前店铺已关闭!!!",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
|
||||
@ -594,6 +593,7 @@
|
||||
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
|
||||
}
|
||||
let oilData = []
|
||||
console.log(this.oilTypeList);
|
||||
this.oilTypeList.forEach(res => {
|
||||
let data = {
|
||||
id: res.numberId,
|
||||
@ -605,7 +605,7 @@
|
||||
})
|
||||
|
||||
this.columns = [oilData]
|
||||
console.log("aaa", this.columns)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -675,8 +675,8 @@
|
||||
uni.openLocation({
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
name:this.store.name,
|
||||
address:this.store.address,
|
||||
name: this.store.name,
|
||||
address: this.store.address,
|
||||
|
||||
success: function() {
|
||||
console.log('success');
|
||||
@ -967,4 +967,4 @@
|
||||
color: white;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -10,7 +10,7 @@
|
||||
|
||||
<!-- 储值卡 -->
|
||||
<view class="xyihang">
|
||||
<view class="title-hei">储值卡</view>
|
||||
<view class="title-hei">电子储值卡</view>
|
||||
</view>
|
||||
<view class="card-cz">
|
||||
<view class="card-top">
|
||||
@ -33,7 +33,7 @@
|
||||
</view>
|
||||
<!-- 囤油卡 -->
|
||||
<view class="xyihang">
|
||||
<view class="title-hei">囤油卡</view>
|
||||
<view class="title-hei">电子囤油卡</view>
|
||||
<view class="d_dis">
|
||||
<view class="" @click="s_()">
|
||||
<text>上一张</text>
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between; ">
|
||||
<view class="bai-box">
|
||||
<view class="title-card">囤油卡</view>
|
||||
<view class="title-card">电子囤油卡</view>
|
||||
<view class="">{{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].oilName || '0'}}
|
||||
</view>
|
||||
<view>剩余油量:{{cardsList[cardsIndex].refuelMoney || '0'}}L</view>
|
||||
|
@ -3,20 +3,35 @@
|
||||
<view class="container">
|
||||
<view class="my-header">
|
||||
<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>
|
||||
<!-- 顶部区域 -->
|
||||
<view class="tap-box">
|
||||
<!-- <view class="tap-box">
|
||||
<view class="box-tap" :class="{ 'act' :actinput == index }" v-for="(item,index) in taplist" :key="index"
|
||||
@click="getindex(index)">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="gang" :class="{ 'actgang' : actinput == index }"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 储值充值 -->
|
||||
<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"
|
||||
:key="index"
|
||||
@click="xzindex(index,item.rechargeBalance,item.fringeBenefit,item.giftBalance,item.points,item.growthValue,item.count,item.id)">
|
||||
@ -168,6 +183,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
types: 0,
|
||||
query: {
|
||||
storeId: ''
|
||||
},
|
||||
@ -202,6 +218,7 @@
|
||||
shuomingList: [],
|
||||
shuomingFList: [],
|
||||
columns: [],
|
||||
actList: [],
|
||||
taplist: [{
|
||||
title: '储值充值'
|
||||
},
|
||||
@ -242,8 +259,22 @@
|
||||
},
|
||||
onShow() {
|
||||
this.getStaffList()
|
||||
this.activen()
|
||||
},
|
||||
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() {
|
||||
console.log();
|
||||
},
|
||||
@ -252,13 +283,13 @@
|
||||
},
|
||||
//囤油卡充值
|
||||
addFuleCarRecords() {
|
||||
if (this.staffId == '') {
|
||||
uni.showToast({
|
||||
title: "员工为必填项",
|
||||
icon: Error
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (this.staffId == '') {
|
||||
// uni.showToast({
|
||||
// title: "员工为必填项",
|
||||
// icon: Error
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
if (this.carValueId == '') {
|
||||
uni.showToast({
|
||||
title: "囤油卡为必填项",
|
||||
@ -283,7 +314,7 @@
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res,_this.appltType)
|
||||
console.log(res, _this.appltType)
|
||||
if (_this.appltType == "WECHAT") {
|
||||
let payProvider = "wxpay"
|
||||
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||
@ -319,7 +350,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (_this.appltType == "ALIPAY") {
|
||||
my.tradePay({
|
||||
tradeNO: res.data.reservedTransactionId
|
||||
@ -348,19 +379,13 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
//储值卡充值
|
||||
addValueCarRecords() {
|
||||
if (this.staffId == '') {
|
||||
uni.showToast({
|
||||
title: "员工为必填项",
|
||||
icon: "error"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.carValueId == '') {
|
||||
uni.showToast({
|
||||
title: "储值卡为必填项",
|
||||
@ -369,7 +394,7 @@
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
|
||||
|
||||
request({
|
||||
url: 'business/marketingActivity/cardValueRecord',
|
||||
method: 'post',
|
||||
@ -380,11 +405,14 @@
|
||||
storeId: this.storeId,
|
||||
chainStoreId: this.chainStoreId,
|
||||
cardFavorableId: this.cardFavorableId,
|
||||
cardRecordId: this.cardRecordId
|
||||
cardRecordId: this.cardRecordId,
|
||||
rechargeBalance: this.rechargeBalance,
|
||||
types: this.types
|
||||
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
||||
|
||||
if (_this.appltType == "WECHAT") {
|
||||
let payProvider = "wxpay"
|
||||
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||
@ -774,6 +802,7 @@
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.box-gang {
|
||||
@ -805,4 +834,12 @@
|
||||
background: white;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.box_s {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
margin: 10px auto;
|
||||
font-size: 14px;
|
||||
color: #f40000;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user