Compare commits
20 Commits
xiaozy
...
9aebbade3c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aebbade3c | ||
|
|
26d9e26c2f | ||
| 2552af652f | |||
| e9f59282a3 | |||
|
|
289ba29759 | ||
|
|
7536516a37 | ||
| 02a74211d6 | |||
| 1cc0753efc | |||
| 71a3188491 | |||
| d7746faca3 | |||
| 16bbe24e5b | |||
|
|
607e13f266 | ||
|
|
fdf4935fb2 | ||
|
|
5c11f4644f | ||
|
|
66ce529d41 | ||
|
|
74d32fa0a7 | ||
| 928947bab4 | |||
|
|
9d2c86a20d | ||
|
|
ff0986230c | ||
| 642d6b07f8 |
26
App.vue
26
App.vue
@@ -67,7 +67,7 @@
|
|||||||
value: item.id
|
value: item.id
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(channelCodes, productCodes, siteBrands)
|
// console.log(channelCodes, productCodes, siteBrands)
|
||||||
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||||
@@ -95,10 +95,12 @@
|
|||||||
if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
|
if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
|
||||||
uni.removeStorageSync('refuseLogin')
|
uni.removeStorageSync('refuseLogin')
|
||||||
}
|
}
|
||||||
|
// console.log('white.includes(view.route)',white.includes(view.route))
|
||||||
// // 是否跳过登陆
|
// // 是否跳过登陆
|
||||||
let isRefuseLogin = uni.getStorageSync('refuseLogin')
|
let isRefuseLogin = uni.getStorageSync('refuseLogin')
|
||||||
if(isRefuseLogin || white.includes(view.route) || view.route.includes('BagAuth')) return
|
if(isRefuseLogin || white.includes(view.route) || view.route.includes('BagAuth')) return
|
||||||
this.getAmount()
|
// console.log('111111111111111')
|
||||||
|
this.getAmount()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 是否token过期或ip更改
|
// 是否token过期或ip更改
|
||||||
@@ -106,10 +108,14 @@
|
|||||||
// clearTimeout(loginTimer)
|
// clearTimeout(loginTimer)
|
||||||
accountApi.getTotalOilCardInfo().then(res => {
|
accountApi.getTotalOilCardInfo().then(res => {
|
||||||
if (res.code == 42011) {
|
if (res.code == 42011) {
|
||||||
|
uni.setStorageSync('Authorization',null)
|
||||||
|
uni.setStorageSync('openid',null)
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '需要您重新登录',
|
title: '需要您重新登录',
|
||||||
content: res.msg,
|
content: res.msg,
|
||||||
duration: '3000',
|
duration: '3000',
|
||||||
|
showCancel:false,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
@@ -126,12 +132,16 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onUnload() {
|
||||||
|
uni.hideLoading()
|
||||||
|
},
|
||||||
|
|
||||||
onShow: function(option) {
|
onShow: function(option) {
|
||||||
const token = uni.getStorageSync('Authorization')
|
// const token = uni.getStorageSync('Authorization')
|
||||||
const openid = uni.getStorageSync('openid')
|
// const openid = uni.getStorageSync('openid')
|
||||||
if (token && openid) {
|
// if (token && openid) {
|
||||||
this.getAmount()
|
// this.getAmount()
|
||||||
}
|
// }
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
@@ -142,7 +152,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
|
|||||||
@@ -280,9 +280,16 @@
|
|||||||
submit() {
|
submit() {
|
||||||
this.checkFn('name');
|
this.checkFn('name');
|
||||||
this.checkFn('plateNumber');
|
this.checkFn('plateNumber');
|
||||||
if (!this.fromStyle.nameType || !this.fromStyle.plateNumberType) {
|
if (!this.fromStyle.nameType) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '还有信息没有填哦',
|
title: '请输入姓名',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
};
|
||||||
|
if (!this.fromStyle.plateNumberType) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '车牌号格式有误',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
共享企业余额
|
共享企业余额
|
||||||
</view>
|
</view>
|
||||||
<text
|
<text
|
||||||
class="text-grey">单日加油额度:{{cardList[cardCur].orderAmountToplimit}}元;单日加油升数额度:{{cardList[cardCur].orderVolumeToplimit}}L</text>
|
class="text-grey">单次加油额度:{{cardList[cardCur].orderAmountToplimit || ''}}{{cardList[cardCur].orderAmountToplimit?'元': '无限制'}};单次加油升数额度:{{cardList[cardCur].orderVolumeToplimit || ''}}{{cardList[cardCur].orderVolumeToplimit ? 'L' : '无限制'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center padding">
|
<view class="text-center padding">
|
||||||
<!-- <view class="text-red text-bold text-lg">
|
<!-- <view class="text-red text-bold text-lg">
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<transBlcok ref="transBlcok" @reloadCard="getCards"/>
|
<transBlcok ref="transBlcok" @reloadCard="getCards" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="customer-service" @click="arousePhone">
|
<view class="customer-service" @click="arousePhone">
|
||||||
<image src="../../static/img/customer-service.png"></image>
|
<image src="../../BagStation/static/img/customer-service.png"></image>
|
||||||
联系客服
|
联系客服
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -304,7 +304,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
console.log('++++++++++++++++++', option)
|
// console.log('++++++++++++++++++', option)
|
||||||
this.test = option.id
|
this.test = option.id
|
||||||
this.id = option.id
|
this.id = option.id
|
||||||
this.tsets = option.name
|
this.tsets = option.name
|
||||||
@@ -312,23 +312,23 @@
|
|||||||
uni.showShareMenu()
|
uni.showShareMenu()
|
||||||
let _that = this
|
let _that = this
|
||||||
this.timeinterval = setInterval(() => {
|
this.timeinterval = setInterval(() => {
|
||||||
console.log('1')
|
// console.log('1')
|
||||||
_that.newQrString()
|
_that.newQrString()
|
||||||
}, 1000 * 60 * 3);
|
}, 1000 * 60 * 3);
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
moneyIntercept(value) {
|
moneyIntercept(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
console.log(value)
|
// console.log(value)
|
||||||
let valus = (parseInt(value * 100) / 100).toFixed(2) + '¥/'
|
let valus = (parseInt(value * 100) / 100).toFixed(2) + '¥/'
|
||||||
console.log(valus)
|
// console.log(valus)
|
||||||
return valus
|
return valus
|
||||||
} else {
|
} else {
|
||||||
return '暂无'
|
return '暂无'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
moneyFormath(value) {
|
moneyFormath(value) {
|
||||||
console.log(value)
|
// console.log(value)
|
||||||
if (value != 'xxx.x') {
|
if (value != 'xxx.x') {
|
||||||
let number = value.toFixed(2)
|
let number = value.toFixed(2)
|
||||||
return number
|
return number
|
||||||
|
|||||||
@@ -188,6 +188,24 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class=" menu cu-list " v-if="plateNumberOcrShow==true">
|
||||||
|
<view class="cu-item nowrap">
|
||||||
|
<view class="text-bold ">
|
||||||
|
车牌识别
|
||||||
|
</view>
|
||||||
|
<view @tap="srcPhoto" class="text-center" style="width: 60%;margin: 0 2%;">
|
||||||
|
<input v-model="plateNumberOcr" type="digit" class="block"
|
||||||
|
placeholder="请点击拍照识别车牌" value="" style="border-bottom: 1px solid #efefef;" />
|
||||||
|
</view>
|
||||||
|
<view @tap="srcPhoto">
|
||||||
|
<uni-icons type="camera-filled" size="30"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="bg-white padding">
|
<view class="bg-white padding">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text class="text-bold">优惠</text>
|
<text class="text-bold">优惠</text>
|
||||||
@@ -367,6 +385,39 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="cu-modal bottom-modal " :class="showPlicePhoto">
|
||||||
|
|
||||||
|
<view class="cu-dialog bg-white">
|
||||||
|
<view class="cu-bar bg-white justify-end">
|
||||||
|
<view class="content"></view>
|
||||||
|
<view class="action" @tap="showPlicePhoto=''">
|
||||||
|
<text class="cuIcon-close text-red"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="height: 1000rpx;">
|
||||||
|
<view style="margin: 100rpx 0;">
|
||||||
|
<uni-icons type="clear" size="80" color="#f56c6c"></uni-icons>
|
||||||
|
<view>
|
||||||
|
<text style="color: #d9001b;font-size: 30rpx;font-weight: bold;">识别失败!</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view style="margin: 60rpx 0;">
|
||||||
|
<button @tap="srcPhoto" style="width: 60%;background-color: #409EFF;color: #ffffff;">重新拍照</button>
|
||||||
|
</view>
|
||||||
|
<view style="margin: 60rpx 0;">
|
||||||
|
<button style="width: 60%;background-color: #F59A23;color: #ffffff;" @click="manualInput">手动输入车牌号</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-popup ref="inputDialog" type="dialog">
|
||||||
|
<uni-popup-dialog mode="input" title="请输入车牌号" value="" :before-close="true"
|
||||||
|
placeholder="请输入" @close="inputClose" @confirm="inputConfirm"></uni-popup-dialog>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -377,6 +428,7 @@
|
|||||||
import oilOssApi from '@/api/oil-oss.js'
|
import oilOssApi from '@/api/oil-oss.js'
|
||||||
import utils from '@/utils/encode'
|
import utils from '@/utils/encode'
|
||||||
import oilInterfacesApi from '@/api/oil-interfaces.js'
|
import oilInterfacesApi from '@/api/oil-interfaces.js'
|
||||||
|
import user from '@/api/user.js'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
channelList: {
|
channelList: {
|
||||||
@@ -504,13 +556,18 @@
|
|||||||
activeChannelCode: '',
|
activeChannelCode: '',
|
||||||
checkBar: [],
|
checkBar: [],
|
||||||
realMoney: '',
|
realMoney: '',
|
||||||
xoilAmountGun: ''
|
xoilAmountGun: '',
|
||||||
|
plateNumberOcr:'',
|
||||||
|
plateNumberOcrShow:false,
|
||||||
|
showPlicePhoto:'',
|
||||||
|
plateNumberImages:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
let oilItem = uni.getStorageSync('oilItem'),
|
let oilItem = uni.getStorageSync('oilItem'),
|
||||||
oilSite = uni.getStorageSync(''),
|
oilSite = uni.getStorageSync(''),
|
||||||
otherUser = uni.getStorageSync('otherUserInfo')
|
otherUser = uni.getStorageSync('otherUserInfo'),
|
||||||
|
companyId = JSON.parse(uni.getStorageSync('companyCard')).companyId
|
||||||
if (otherUser) {
|
if (otherUser) {
|
||||||
// console.log('这里是卡里')
|
// console.log('这里是卡里')
|
||||||
this.isOtherUser = true
|
this.isOtherUser = true
|
||||||
@@ -520,6 +577,8 @@
|
|||||||
console.log('oilItem', oilItem)
|
console.log('oilItem', oilItem)
|
||||||
this.showtitles = oilItem.listTag;
|
this.showtitles = oilItem.listTag;
|
||||||
this.init()
|
this.init()
|
||||||
|
console.log(companyId)
|
||||||
|
this.getCompanyConfig(companyId)
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
activeChannelCode: {
|
activeChannelCode: {
|
||||||
@@ -598,6 +657,86 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
manualInput(){
|
||||||
|
this.showPlicePhoto=''
|
||||||
|
this.$refs.inputDialog.open()
|
||||||
|
},
|
||||||
|
inputClose(){
|
||||||
|
this.$refs.inputDialog.close()
|
||||||
|
},
|
||||||
|
inputConfirm(val){
|
||||||
|
if(val){
|
||||||
|
this.plateNumberOcr = val
|
||||||
|
this.$refs.inputDialog.close()
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入车牌号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
getCompanyConfig(companyId){
|
||||||
|
if(companyId){
|
||||||
|
user.getCompanyConfigByCompanyId(companyId).then(res=>{
|
||||||
|
if(res.data.plateNumberOcr==1){
|
||||||
|
this.plateNumberOcrShow = true
|
||||||
|
}else{
|
||||||
|
this.plateNumberOcrShow = false
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
srcPhoto(){
|
||||||
|
this.showPlicePhoto=''
|
||||||
|
let _that = this
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1, //默认9
|
||||||
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['camera'], // 只能拍照
|
||||||
|
success: function(res) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '识别中',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
|
||||||
|
const JSESSIONID = utils.uuid()
|
||||||
|
uni.uploadFile({
|
||||||
|
url: 'http://uat.xingoil.com/adminapi/oil-oss/obejct/carNoIdentify',
|
||||||
|
filePath: res.tempFilePaths[0],
|
||||||
|
name: 'file',
|
||||||
|
header: {
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
"Authorization": uni.getStorageSync('Authorization'),
|
||||||
|
'dataSources': 'MP',
|
||||||
|
"imei": uni.getStorageSync('unionid'),
|
||||||
|
"openId": uni.getStorageSync('openid'),
|
||||||
|
'JSESSIONID': JSESSIONID,
|
||||||
|
'token': utils.md5Salt(JSESSIONID)
|
||||||
|
},
|
||||||
|
success(e) {
|
||||||
|
uni.hideLoading()
|
||||||
|
let obj = JSON.parse(e.data)
|
||||||
|
if(obj.data&&obj.data.carNo){
|
||||||
|
_that.plateNumberOcr = obj.data.carNo
|
||||||
|
_that.plateNumberImages = obj.data.imgUrl
|
||||||
|
}else{
|
||||||
|
_that.plateNumberOcr = ''
|
||||||
|
_that.showPlicePhoto = 'show'
|
||||||
|
}
|
||||||
|
},fail(res){
|
||||||
|
uni.hideLoading()
|
||||||
|
_that.showPlicePhoto = 'show'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
typeChenk() {
|
typeChenk() {
|
||||||
return this.channelList[this.activeCur]?.secondChannelCode && this.thirdPartyDynamicData.includes(this
|
return this.channelList[this.activeCur]?.secondChannelCode && this.thirdPartyDynamicData.includes(this
|
||||||
.channelList[this.activeCur].secondChannelCode)
|
.channelList[this.activeCur].secondChannelCode)
|
||||||
@@ -1135,14 +1274,23 @@
|
|||||||
'xoilAmountGun': this.vol
|
'xoilAmountGun': this.vol
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var orderData = {
|
if(this.plateNumberOcrShow == true){
|
||||||
|
if(!this.plateNumberOcr){
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请上传车牌照片'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var orderData = {
|
||||||
amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '',
|
amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '',
|
||||||
shareCompanyQuota: 0, // 共享标识
|
shareCompanyQuota: 0, // 共享标识
|
||||||
priceId: this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键
|
priceId: this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键
|
||||||
orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单)
|
orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单)
|
||||||
orderSource: "WECHAT_MINIAPPS", //类型:String 必有字段 备注:订单来源(WECHAT_MINIAPPS)
|
orderSource: "WECHAT_MINIAPPS", //类型:String 必有字段 备注:订单来源(WECHAT_MINIAPPS)
|
||||||
plateNumber: this.plateNumber ? this.plateNumber : this
|
plateNumber: this.plateNumberOcrShow == true ? this.plateNumberOcr : this
|
||||||
.plateNumberSel, //类型:String 必有字段 备注:车牌号
|
.plateNumber, //类型:String 必有字段 备注:车牌号
|
||||||
|
plateNumberImages: this.plateNumberImages, // 车牌照片地址
|
||||||
siteUserName: this.jober, //类型:String 必有字段 备注:加油员
|
siteUserName: this.jober, //类型:String 必有字段 备注:加油员
|
||||||
oilsBar: this.oilBar, //类型:Number 必有字段 备注:油枪
|
oilsBar: this.oilBar, //类型:Number 必有字段 备注:油枪
|
||||||
volume: this.activeChannelCode == 'TY' ? this.tyRes.liter : this
|
volume: this.activeChannelCode == 'TY' ? this.tyRes.liter : this
|
||||||
@@ -1155,6 +1303,29 @@
|
|||||||
'version': 1,
|
'version': 1,
|
||||||
'xoilAmountGun': this.vol
|
'xoilAmountGun': this.vol
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
var orderData = {
|
||||||
|
amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '',
|
||||||
|
shareCompanyQuota: 0, // 共享标识
|
||||||
|
priceId: this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键
|
||||||
|
orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单)
|
||||||
|
orderSource: "WECHAT_MINIAPPS", //类型:String 必有字段 备注:订单来源(WECHAT_MINIAPPS)
|
||||||
|
plateNumber: this.plateNumber ? this.plateNumber : this
|
||||||
|
.plateNumberSel, //类型:String 必有字段 备注:车牌号
|
||||||
|
siteUserName: this.jober, //类型:String 必有字段 备注:加油员
|
||||||
|
oilsBar: this.oilBar, //类型:Number 必有字段 备注:油枪
|
||||||
|
volume: this.activeChannelCode == 'TY' ? this.tyRes.liter : this
|
||||||
|
.vol, //类型:Number 必有字段 备注:加油升数
|
||||||
|
realPrice: this.oilSitePriceDetailsVo[this.radio].sitePrice, //类型:Number 必有字段 备注:实际加油价格
|
||||||
|
suppleMark: 0, //类型:Number 必有字段 备注:补录标识(0:实时订单 1:补录订单)
|
||||||
|
createSource: "XOIL_DRIVER_COMPANY_WECHAT_APPLET", //类型:String 必有字段 备注:创建来源( XOIL_DRIVER_COMPANY_WECHAT_APPLET)
|
||||||
|
// "deviceImei": "mock", //类型:String 可有字段 备注:设备唯一码
|
||||||
|
// "networkIp": "mock" //类型:String 可有字段 备注:ip地址
|
||||||
|
'version': 1,
|
||||||
|
'xoilAmountGun': this.vol
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// console.log(orderData)
|
// console.log(orderData)
|
||||||
let location = uni.getStorageSync('location') || {
|
let location = uni.getStorageSync('location') || {
|
||||||
|
|||||||
@@ -461,7 +461,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '操作频繁',
|
title: '操作频繁,请5s后再试',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.isdisabled = false
|
this.isdisabled = false
|
||||||
|
|||||||
@@ -487,7 +487,7 @@
|
|||||||
markerList.forEach((item, index) => {
|
markerList.forEach((item, index) => {
|
||||||
let configure = {
|
let configure = {
|
||||||
siteId: item.id,
|
siteId: item.id,
|
||||||
id: Number(`${index}`), //2023.08.30 在此处踩坑 一作这b竟然把id重新赋值了
|
id: Number(`${index}`), //2023.08.30 在此处踩坑 一作这b竟然把id重新赋值了。 一作:去好好查一下官网的MAP中的marker的文档 id字段的注意事项,再看一下后台给的id, 补补课
|
||||||
imgCustomCallout: this.olitype(item.siteChannel),
|
imgCustomCallout: this.olitype(item.siteChannel),
|
||||||
iconPath: '../../static/img/tt.png',
|
iconPath: '../../static/img/tt.png',
|
||||||
width: 5,
|
width: 5,
|
||||||
|
|||||||
@@ -56,16 +56,16 @@
|
|||||||
seleIndex:0,
|
seleIndex:0,
|
||||||
kmData:[
|
kmData:[
|
||||||
{
|
{
|
||||||
lable:'20KM',
|
lable:'5KM',
|
||||||
value:20000
|
value:5000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable:'10KM',
|
||||||
|
value:10000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lable:'30KM',
|
lable:'30KM',
|
||||||
value:30000
|
value:30000
|
||||||
},
|
|
||||||
{
|
|
||||||
lable:'50KM',
|
|
||||||
value:50000
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
width: 40,
|
width: 40,
|
||||||
height: 50
|
height: 50
|
||||||
},
|
},
|
||||||
radius: 20000,
|
radius: 5000,
|
||||||
LastCoordinate: [],
|
LastCoordinate: [],
|
||||||
timer: null,
|
timer: null,
|
||||||
TXSDK: null,
|
TXSDK: null,
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
// list.length = 100;
|
// list.length = 100;
|
||||||
this.markers = this.locationProcessing(res.data);
|
this.markers = this.locationProcessing(res.data);
|
||||||
this.spareMarkers = JSON.parse(JSON.stringify(this.markers));
|
this.spareMarkers = JSON.parse(JSON.stringify(this.markers));
|
||||||
console.log(this.spareMarkers, '////////////////////////')
|
// console.log(this.spareMarkers, '////////////////////////')
|
||||||
// markersArray.forEach((item,index)=>{
|
// markersArray.forEach((item,index)=>{
|
||||||
|
|
||||||
// })
|
// })
|
||||||
@@ -363,8 +363,8 @@
|
|||||||
},
|
},
|
||||||
mapUpdated(e) {
|
mapUpdated(e) {
|
||||||
let that = this
|
let that = this
|
||||||
console.log('%c 更新', 'font-size:50px;color:red');
|
// console.log('%c 更新', 'font-size:50px;color:red');
|
||||||
console.log(e, '*****************************************')
|
// console.log(e, '*****************************************')
|
||||||
// that.mapContext.getScale({
|
// that.mapContext.getScale({
|
||||||
// success: function(e) {
|
// success: function(e) {
|
||||||
// // that.$nextTick(function() {
|
// // that.$nextTick(function() {
|
||||||
|
|||||||
18
api/integral.js
Normal file
18
api/integral.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
getByPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/oil-finance/oilCustomerIntegralRecord/getByPage',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getByCustomerId(customerId) {
|
||||||
|
return request({
|
||||||
|
url: `/oil-finance/oilCustomerIntegralAccount/getByCustomerId/${customerId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
19
api/user.js
Normal file
19
api/user.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
const service_name = "oil-user"
|
||||||
|
const group_name = "oilCustomerInfo"
|
||||||
|
export default{
|
||||||
|
carNoIdentify(data) { //图片上传-ORC识别
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/carNoIdentify`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询企业配置
|
||||||
|
getCompanyConfigByCompanyId(id) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/sysCompanyConfig/getCompanyConfigByCompanyId/${id}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,21 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="cu-item cur padding no-mr-border site-item" :style="{'min-height': siteItem.activitySwitch?mHeight+'rpx !important':''}">
|
<view class="cu-item cur padding no-mr-border site-item"
|
||||||
|
:style="{'min-height': siteItem.activitySwitch?mHeight+'rpx !important':''}">
|
||||||
<view class="cu-avatar radius lg "
|
<view class="cu-avatar radius lg "
|
||||||
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
|
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<view style="flex-shrink:1" class="text-cut text-black text-lg padding-right-sm "> {{siteItem.siteName}}</view>
|
<view style="flex-shrink:1" class="text-cut text-black text-lg padding-right-sm ">
|
||||||
<view v-if="siteItem.siteLevel" class="siteName_tag">{{siteItem.siteLevel}}</view>
|
{{siteItem.siteName}}</view>
|
||||||
|
<!-- <view v-if="siteItem.siteLevel" class="siteName_tag">{{siteItem.siteLevel}}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;" class="listTages">
|
<view style="display: flex;" class="listTages">
|
||||||
<view :style="{background:siteItem.siteType==1?'#FF6700':'#00c15e'}" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteType==1?'加油站':'加气站'}}</view>
|
<view :style="{background:siteItem.siteType==1?'#FF6700':'#00c15e'}"
|
||||||
|
class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteType==1?'加油站':'加气站'}}
|
||||||
|
</view>
|
||||||
<view class="cu-tag round bg-self--dark-blue yu-tag text-xs" v-show="siteItem.ureaNumber>0">尿素</view>
|
<view class="cu-tag round bg-self--dark-blue yu-tag text-xs" v-show="siteItem.ureaNumber>0">尿素</view>
|
||||||
<!-- <view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}级</view> -->
|
<!-- <view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}级</view> -->
|
||||||
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}</view>
|
<view class="cu-tag round bg-self-yellow yu-tag text-xs"
|
||||||
|
:class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}</view>
|
||||||
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
|
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
|
||||||
<view v-if="siteItem.highSpeedMark||siteItem.roadTpye" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark,siteItem.roadTpye)}">{{speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view>
|
<view v-if="siteItem.highSpeedMark||siteItem.roadTpye"
|
||||||
|
class="cu-tag round bg-self--dark-blue yu-tag text-xs"
|
||||||
|
:style="{background:speedMarkColor(siteItem.highSpeedMark,siteItem.roadTpye)}">
|
||||||
|
{{speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}
|
||||||
|
</view>
|
||||||
<!-- <view v-if="siteItem.highSpeedMark!=null" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark)}">{{siteItem.highSpeedMark?siteItem.highSpeedMark:siteItem.roadTpye|speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view> -->
|
<!-- <view v-if="siteItem.highSpeedMark!=null" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark)}">{{siteItem.highSpeedMark?siteItem.highSpeedMark:siteItem.roadTpye|speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
@@ -31,7 +40,8 @@
|
|||||||
¥{{siteItem.sitePrice|moneyFormat}}
|
¥{{siteItem.sitePrice|moneyFormat}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<text class="cu-tag oil-tag radius text-xs" v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">省¥{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text>
|
<text class="cu-tag oil-tag radius text-xs"
|
||||||
|
v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">省¥{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-cut padding-left-sm text-lg">
|
<view class="text-cut padding-left-sm text-lg">
|
||||||
<text class="text-delete color-333 text-sm padding-right-xs">
|
<text class="text-delete color-333 text-sm padding-right-xs">
|
||||||
@@ -76,51 +86,52 @@
|
|||||||
return {
|
return {
|
||||||
mHeight: 156,
|
mHeight: 156,
|
||||||
starUrl: this.global.starUrl,
|
starUrl: this.global.starUrl,
|
||||||
defaultLogo:'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/logo_default.png'
|
defaultLogo: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/logo_default.png'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const query = uni.createSelectorQuery().in(this);
|
const query = uni.createSelectorQuery().in(this);
|
||||||
|
|
||||||
query.select('.activity-cu').boundingClientRect(data => {undefined
|
query.select('.activity-cu').boundingClientRect(data => {
|
||||||
|
undefined
|
||||||
|
|
||||||
// console.log(data,'1111111111111111111')
|
// console.log(data,'1111111111111111111')
|
||||||
if(data){
|
if (data) {
|
||||||
this.mHeight = this.mHeight + data.height*2
|
this.mHeight = this.mHeight + data.height * 2
|
||||||
}
|
}
|
||||||
}).exec();
|
}).exec();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
speedMarkColor(val,data){
|
speedMarkColor(val, data) {
|
||||||
if(val == 0){
|
if (val == 0) {
|
||||||
if(data == '0'){
|
if (data == '0') {
|
||||||
return '#666666'
|
return '#666666'
|
||||||
}
|
}
|
||||||
if(data == '1'){
|
if (data == '1') {
|
||||||
return '#F9AA64'
|
return '#F9AA64'
|
||||||
}
|
}
|
||||||
if(data == '2'){
|
if (data == '2') {
|
||||||
return '#D61750'
|
return '#D61750'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(val == 1){
|
if (val == 1) {
|
||||||
return '#11A265'
|
return '#11A265'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
speedMark(val,data){
|
speedMark(val, data) {
|
||||||
// console.log(val,data,'qqqqqqqqqqqqqqqqqqqqqq')
|
// console.log(val,data,'qqqqqqqqqqqqqqqqqqqqqq')
|
||||||
if(val == 0){
|
if (val == 0) {
|
||||||
if(data == '0'){
|
if (data == '0') {
|
||||||
return '普通'
|
return '普通'
|
||||||
}
|
}
|
||||||
if(data == '1'){
|
if (data == '1') {
|
||||||
return '省道'
|
return '省道'
|
||||||
}
|
}
|
||||||
if(data == '2'){
|
if (data == '2') {
|
||||||
return '国道'
|
return '国道'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(val == 1){
|
if (val == 1) {
|
||||||
return '高速'
|
return '高速'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -128,7 +139,7 @@
|
|||||||
filters: {
|
filters: {
|
||||||
channelCodeFamt(value) {
|
channelCodeFamt(value) {
|
||||||
// console.log(value)
|
// console.log(value)
|
||||||
if (value == null || value == '' ) {
|
if (value == null || value == '') {
|
||||||
return '未知'
|
return '未知'
|
||||||
// 渠道编码 ( XOIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
// 渠道编码 ( XOIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
// switch (value) {
|
// switch (value) {
|
||||||
@@ -159,7 +170,9 @@
|
|||||||
// console.log('old:',value)
|
// console.log('old:',value)
|
||||||
// console.log('new:',realAmount)
|
// console.log('new:',realAmount)
|
||||||
// return realAmount
|
// return realAmount
|
||||||
return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
|
return String(value).split('.')[1] && String(value).split('.')[1].length > 2 ? Number(
|
||||||
|
`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`
|
||||||
|
).toFixed(2) : Number(value).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
return '0.00'
|
return '0.00'
|
||||||
}
|
}
|
||||||
@@ -169,10 +182,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.siteName_tag{
|
.siteName_tag {
|
||||||
background-color: #FF6700;
|
background-color: #FF6700;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
width: 20px ;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -182,47 +195,56 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-item {
|
.site-item {
|
||||||
margin-bottom: 1.8rem;
|
margin-bottom: 1.8rem;
|
||||||
align-items: flex-start !important;
|
align-items: flex-start !important;
|
||||||
height: 147rpx!important;
|
height: 147rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yellow-oil{
|
.yellow-oil {
|
||||||
color: #e8775a;
|
color: #e8775a;
|
||||||
}
|
}
|
||||||
.cu-avatar{
|
|
||||||
|
.cu-avatar {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
.tag-red{
|
|
||||||
|
.tag-red {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
.levelBox{
|
|
||||||
font-size: 24rpx;
|
.levelBox {
|
||||||
color: red;
|
font-size: 24rpx;
|
||||||
font-weight:bold;
|
color: red;
|
||||||
margin-left: 16rpx;
|
font-weight: bold;
|
||||||
|
margin-left: 16rpx;
|
||||||
}
|
}
|
||||||
.bg-self--dark-blue{
|
|
||||||
|
.bg-self--dark-blue {
|
||||||
background: #2098ff;
|
background: #2098ff;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.activity-cu{
|
|
||||||
|
.activity-cu {
|
||||||
border: 1px solid #FF9000;
|
border: 1px solid #FF9000;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.activity-cu text{
|
|
||||||
|
.activity-cu text {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 0 18rpx;
|
padding: 0 18rpx;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
.activity-cu text:last-child{
|
|
||||||
color:#ff9818;
|
.activity-cu text:last-child {
|
||||||
|
color: #ff9818;
|
||||||
}
|
}
|
||||||
.activity-cu text:first-child{
|
|
||||||
color:#ff6f0e;
|
.activity-cu text:first-child {
|
||||||
|
color: #ff6f0e;
|
||||||
background: #FFEBDE;
|
background: #FFEBDE;
|
||||||
border-top-left-radius: 5px;
|
border-top-left-radius: 5px;
|
||||||
border-bottom-left-radius: 5px;
|
border-bottom-left-radius: 5px;
|
||||||
|
|||||||
12
pages.json
12
pages.json
@@ -34,10 +34,14 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "星油云" // "enablePullDownRefresh": true
|
"navigationBarTitleText": "星油云" // "enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/tabbar/user/integralRecord",
|
||||||
, {
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"path": "pages/tabbar/qrCenter/qrCenter",
|
"path": "pages/tabbar/qrCenter/qrCenter",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted')
|
// console.log('mounted')
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.option = option;
|
this.option = option;
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
onReady(option) {},
|
onReady(option) {},
|
||||||
methods: {
|
methods: {
|
||||||
versionUpdate() {
|
versionUpdate() {
|
||||||
console.log('versionUpdate')
|
// console.log('versionUpdate')
|
||||||
let that = this
|
let that = this
|
||||||
const updateManager = uni.getUpdateManager();
|
const updateManager = uni.getUpdateManager();
|
||||||
updateManager.onCheckForUpdate(function(res) {
|
updateManager.onCheckForUpdate(function(res) {
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
if(res.code==20000) isOnline = true
|
if(res.code==20000) isOnline = true
|
||||||
}).catch(err=>{})
|
}).catch(err=>{})
|
||||||
}
|
}
|
||||||
console.log(isOnline,'isOnline')
|
// console.log(isOnline,'isOnline')
|
||||||
if (isOnline) {
|
if (isOnline) {
|
||||||
this.key = '在线'
|
this.key = '在线'
|
||||||
} else {
|
} else {
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.key == '在线') {
|
if (this.key == '在线') {
|
||||||
console.log(type, 'typetypetypetype');
|
// console.log(type, 'typetypetypetype');
|
||||||
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: `/pages/tabbar/home/home`,
|
url: `/pages/tabbar/home/home`,
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
},
|
},
|
||||||
Interceptor(id) {
|
Interceptor(id) {
|
||||||
let taht = this
|
let taht = this
|
||||||
console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px');
|
// console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px');
|
||||||
// this.tools.overallInterceptor((opentype) => {
|
// this.tools.overallInterceptor((opentype) => {
|
||||||
// uni.removeInterceptor(opentype);
|
// uni.removeInterceptor(opentype);
|
||||||
// wxCode.getQrCodeType({
|
// wxCode.getQrCodeType({
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getFilterData() {
|
getFilterData() {
|
||||||
console.log('wodefenzhi')
|
// console.log('wodefenzhi')
|
||||||
oilSiteApi.getCheckInfo().then(res => {
|
oilSiteApi.getCheckInfo().then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
|
|
||||||
@@ -206,13 +206,13 @@
|
|||||||
value: item.id
|
value: item.id
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(channelCodes, productCodes, siteBrands)
|
// console.log(channelCodes, productCodes, siteBrands)
|
||||||
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||||
uni.setStorageSync('filterData', this.menuList)
|
uni.setStorageSync('filterData', this.menuList)
|
||||||
uni.setStorageSync('productCodeList', res.data.productCodeList)
|
uni.setStorageSync('productCodeList', res.data.productCodeList)
|
||||||
console.log(res, '%c 这里是启动页调用的菜单列表', 'font-size:36px;color:red;')
|
// console.log(res, '%c 这里是启动页调用的菜单列表', 'font-size:36px;color:red;')
|
||||||
// this.$refs.slFilter.resetMenuList(this.menuList)
|
// this.$refs.slFilter.resetMenuList(this.menuList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
167
pages/tabbar/user/integralRecord.vue
Normal file
167
pages/tabbar/user/integralRecord.vue
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">积分记录</block>
|
||||||
|
</cu-custom>
|
||||||
|
<view class="banner">
|
||||||
|
<view>{{balance}}</view>
|
||||||
|
<view>当前积分</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="list"> -->
|
||||||
|
<scroll-view class="list" :scroll-y="true" @scrolltolower="lower">
|
||||||
|
<view class="item" v-for="item,index in recodeList" :key="index">
|
||||||
|
<view>{{typeEnum[item.type]}}</view>
|
||||||
|
<view>{{item.createTime}}</view>
|
||||||
|
<view>{{(item.type == 1 ||item.type == 3) ? '+' : '-'}}{{item.occurAmount}}</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view class="occupy"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import serve from '@/api/integral.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
parameter: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
params: {
|
||||||
|
customerId: uni.getStorageSync('user').id
|
||||||
|
},
|
||||||
|
},
|
||||||
|
balance: 0,
|
||||||
|
recodeList: [],
|
||||||
|
typeEnum: {
|
||||||
|
1: '加油收入',
|
||||||
|
2: '加油退款',
|
||||||
|
3: '商品兑换',
|
||||||
|
4: '商品兑换退款'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getByCustomerId()
|
||||||
|
this.getByPage()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getByPage() {
|
||||||
|
serve.getByPage(this.parameter).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
if (!res.data.list.length) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '没有更多数据了~',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.recodeList = this.recodeList.concat(res.data.list)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getByCustomerId() {
|
||||||
|
serve.getByCustomerId(this.parameter.params.customerId).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.balance = res.data.balance
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
lower() {
|
||||||
|
this.parameter.currentPage += 1
|
||||||
|
this.getByPage()
|
||||||
|
console.log('到底了')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
background: #F2F2F2;
|
||||||
|
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.banner {
|
||||||
|
margin: 37rpx auto 0;
|
||||||
|
padding-top: 105rpx;
|
||||||
|
width: 684rpx;
|
||||||
|
height: 337rpx;
|
||||||
|
background: url('https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/integral-background.png') 100%/100% no-repeat;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
&:nth-of-type(1) {
|
||||||
|
font-size: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-of-type(2) {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 26rpx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: hidden;
|
||||||
|
|
||||||
|
margin: 37rpx auto 0;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
width: 684rpx;
|
||||||
|
background: #FFF;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
position: relative;
|
||||||
|
padding: 25rpx 30rpx 0 30rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 125rpx;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
&:nth-of-type(1) {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-of-type(2) {
|
||||||
|
margin-top: 15rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-of-type(3) {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
right: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
bottom: 0;
|
||||||
|
width: 632rpx;
|
||||||
|
height: 1rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.occupy {
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -109,24 +109,35 @@
|
|||||||
<view class="cu-list menu">
|
<view class="cu-list menu">
|
||||||
<view class="cu-item hidden-cu-item">
|
<view class="cu-item hidden-cu-item">
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item arrow">
|
<view class="cu-item arrow" @click="goIntegral">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image :src="starUrl+'zskf.png'" class="png" mode="aspectFit"></image>
|
<!-- <image :src="imgURL+'yunsite-kefu.png'" class="png" mode="aspectFit"></image> -->
|
||||||
|
<text class="text-grey padding-left-sm">我的积分</text>
|
||||||
|
</view>
|
||||||
|
<view class="action">
|
||||||
|
<!-- <button class="cu-btn oil-main-btn-color" open-type="contact" @contact="onContact"> -->
|
||||||
|
<!-- <text class="text-grey text-sm">打开会话</text> -->
|
||||||
|
<!-- </button> -->
|
||||||
|
<view>{{balance}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-item arrow" @click="makeCall">
|
||||||
|
<view class="content">
|
||||||
|
<!-- <image :src="imgURL+'yunsite-kefu.png'" class="png" mode="aspectFit"></image> -->
|
||||||
<text class="text-grey padding-left-sm">专属客服</text>
|
<text class="text-grey padding-left-sm">专属客服</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<!-- <button class="cu-btn oil-main-btn-color" open-type="contact" @contact="onContact"> -->
|
<!-- <button class="cu-btn oil-main-btn-color" open-type="contact" @contact="onContact"> -->
|
||||||
<!-- <text class="text-grey text-sm">打开会话</text> -->
|
<!-- <text class="text-grey text-sm">打开会话</text> -->
|
||||||
<!-- </button> -->
|
<!-- </button> -->
|
||||||
<view class="cu-btn oil-main-btn-color" @click="makeCall">
|
<!-- <view class="cu-btn oil-main-btn-color" @click="makeCall">
|
||||||
<text class="text-grey text-sm">联系客服</text>
|
<text class="text-grey text-sm">联系客服</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cu-item arrow">
|
<view class="cu-item arrow">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image :src="starUrl+'gywm.png'" class="png" mode="aspectFit"></image>
|
<!-- <image :src="imgURL+'yunsite-about.png'" class="png" mode="aspectFit"></image> -->
|
||||||
<text class="text-grey padding-left-sm">关于我们</text>
|
<text class="text-grey padding-left-sm">关于我们</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -143,6 +154,7 @@
|
|||||||
import oilSiteApi from '@/api/oil-site.js'
|
import oilSiteApi from '@/api/oil-site.js'
|
||||||
import SwitchEnterprises from '@/components/SwitchEnterprises.vue'
|
import SwitchEnterprises from '@/components/SwitchEnterprises.vue'
|
||||||
import accountApi from '@/api/account.js'
|
import accountApi from '@/api/account.js'
|
||||||
|
import integralServe from '@/api/integral.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
SwitchEnterprises
|
SwitchEnterprises
|
||||||
@@ -163,7 +175,8 @@
|
|||||||
isCompany: uni.getStorageSync('accountStatus'),
|
isCompany: uni.getStorageSync('accountStatus'),
|
||||||
user: uni.getStorageSync('user'),
|
user: uni.getStorageSync('user'),
|
||||||
wxInfo: uni.getStorageSync('wxInfo'),
|
wxInfo: uni.getStorageSync('wxInfo'),
|
||||||
userTotal: {}
|
userTotal: {},
|
||||||
|
balance: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -171,8 +184,21 @@
|
|||||||
this.getAuthInfo()
|
this.getAuthInfo()
|
||||||
this.getAmount();
|
this.getAmount();
|
||||||
this.upadteCompanyCard()
|
this.upadteCompanyCard()
|
||||||
|
this.getByCustomerId()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goIntegral() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: './integralRecord'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getByCustomerId() {
|
||||||
|
integralServe.getByCustomerId(this.user.id).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.balance = res.data.balance
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
logout() {
|
logout() {
|
||||||
this.isSwitchEnterprises = false
|
this.isSwitchEnterprises = false
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user