更新
This commit is contained in:
26
App.vue
26
App.vue
@@ -38,10 +38,6 @@
|
|||||||
})
|
})
|
||||||
this.onShareAppMessage(option.query.scene);
|
this.onShareAppMessage(option.query.scene);
|
||||||
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
console.log(e,'666666666666666666666666666666')
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
@@ -131,28 +127,9 @@
|
|||||||
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')
|
||||||
let key = ''
|
|
||||||
if (token && openid) {
|
if (token && openid) {
|
||||||
this.getAmount()
|
this.getAmount()
|
||||||
key = '真在线'
|
|
||||||
} else {
|
|
||||||
key = '离线'
|
|
||||||
}
|
}
|
||||||
if (key == '在线') {
|
|
||||||
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
console.log(key)
|
|
||||||
if (key == '在线') {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/BagAuth/pages/login/login'
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
}, 2000)
|
|
||||||
// uni.showShareMenu()
|
|
||||||
// console.log('App Show')
|
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
@@ -163,9 +140,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onHide: function() {
|
|
||||||
// console.log('App Hide')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view >
|
<view>
|
||||||
<view class="bg-img boxsingForCard flex align-center swi-bg"
|
<view class="bg-img boxsingForCard flex align-center swi-bg"
|
||||||
:style="'background-image: url('+imgURL+ (card.oilCardType==2?'card-zs.png':'card-other.png')+');'">
|
:style="'background-image: url('+imgURL+ (card.oilCardType==2?'card-zs.png':'card-other.png')+');'">
|
||||||
<view class="padding-xl text-white">
|
<view class="padding-xl text-white">
|
||||||
@@ -13,8 +13,10 @@
|
|||||||
<text v-show="card.oilCardType==1">
|
<text v-show="card.oilCardType==1">
|
||||||
个人油卡
|
个人油卡
|
||||||
</text>
|
</text>
|
||||||
<text style="margin-left: 15rpx;padding: 10rpx 15rpx;border-radius: 15rpx;color: #FF6700;background-color: #FFFFFF;font-size: 20rpx;">{{card.companyType|companyType}}</text>
|
<text
|
||||||
<text v-show="card.plateNumberCompany" style="margin-left: 15rpx;padding: 10rpx 15rpx;border-radius: 15rpx;color: #FF6700;background-color: #FFFFFF;font-size: 20rpx;">{{card.plateNumberCompany?card.plateNumberCompany:''}}</text>
|
style="margin-left: 15rpx;padding: 10rpx 15rpx;border-radius: 15rpx;color: #FF6700;background-color: #FFFFFF;font-size: 20rpx;">{{card.companyType|companyType}}</text>
|
||||||
|
<text v-show="card.plateNumberCompany"
|
||||||
|
style="margin-left: 15rpx;padding: 10rpx 15rpx;border-radius: 15rpx;color: #FF6700;background-color: #FFFFFF;font-size: 20rpx;">{{card.plateNumberCompany?card.plateNumberCompany:''}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-xs padding-top-lg padding-bottom text-xxl">
|
<view class="padding-xs padding-top-lg padding-bottom text-xxl">
|
||||||
{{card.accountCardCode|cardNoFormat}}
|
{{card.accountCardCode|cardNoFormat}}
|
||||||
@@ -32,8 +34,22 @@
|
|||||||
{{card.balance|moneyFormat}} 元
|
{{card.balance|moneyFormat}} 元
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="inCard" v-if="card.oilCardType==3" @tap='gotocard'>
|
|
||||||
<text>转卡</text>
|
<view v-show="!isTransfer" class="card-container first">
|
||||||
|
<view class="inCard" v-if="card.oilCardType==3" @tap="transfer">
|
||||||
|
<text>转卡</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-show="isTransfer" :class="isTransfer?'active':''" class="card-container second">
|
||||||
|
<view class="inCard" @click="sweepCard">
|
||||||
|
<text>扫码</text>
|
||||||
|
</view>
|
||||||
|
<view class="inCard phone" @tap='gotocard'>
|
||||||
|
<text>手机号码</text>
|
||||||
|
</view>
|
||||||
|
<view class="back" @click="transfer">
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -42,48 +58,22 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
filters: {
|
||||||
card: {
|
companyType(e) {
|
||||||
type: Object,
|
if (e) e = Number(e)
|
||||||
default () {}
|
switch (e) {
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
imgURL: this.global.imgURL,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
gotocard(){
|
|
||||||
if(this.card.oilCardType==3&&this.card.shareCompanyQuota==0){
|
|
||||||
let card = JSON.stringify(this.card)
|
|
||||||
uni.redirectTo({
|
|
||||||
url:'../../pages/oilCards/oliout?card='+card
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
title: '当前油卡为共享企业余额,不能进行此操作!',
|
|
||||||
icon: "none"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filters:{
|
|
||||||
companyType(e){
|
|
||||||
if(e) e=Number(e)
|
|
||||||
switch(e){
|
|
||||||
case 0:
|
case 0:
|
||||||
return '柴油账户'
|
return '柴油账户'
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return '汽油账户'
|
return '汽油账户'
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return 'LNG账户'
|
return 'LNG账户'
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return '尿素'
|
return '尿素'
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
moneyFormat(value) {
|
moneyFormat(value) {
|
||||||
@@ -95,38 +85,126 @@
|
|||||||
},
|
},
|
||||||
cardNoFormat(value) {
|
cardNoFormat(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return value.replace(/(.{4})/g,'$1 ')
|
return value.replace(/(.{4})/g, '$1 ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
props: {
|
||||||
|
card: {
|
||||||
|
type: Object,
|
||||||
|
default () {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
imgURL: this.global.imgURL,
|
||||||
|
isTransfer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
transfer() {
|
||||||
|
this.isTransfer = !this.isTransfer
|
||||||
|
},
|
||||||
|
sweepCard() {
|
||||||
|
uni.scanCode({
|
||||||
|
success: res => {
|
||||||
|
console.log(res)
|
||||||
|
let {} = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
gotocard() {
|
||||||
|
if (this.card.oilCardType == 3 && this.card.shareCompanyQuota == 0) {
|
||||||
|
let card = JSON.stringify(this.card)
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/oilCards/oliout?card=' + card
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '当前油卡为共享企业余额,不能进行此操作!',
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.boxsingForCard{
|
.boxsingForCard {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.inCard{
|
|
||||||
position: absolute;
|
.card-container {
|
||||||
right: 11%;
|
position: absolute;
|
||||||
bottom: 17%;
|
bottom: 13%;
|
||||||
width: 140rpx;
|
|
||||||
height: 55rpx;
|
&.first {
|
||||||
background-color: #FFFFFF;
|
right: 11%;
|
||||||
border-radius: 20rpx;
|
}
|
||||||
color: red;
|
|
||||||
display: flex;
|
&.second {
|
||||||
justify-content: center;
|
right: 9%;
|
||||||
align-items: center;
|
padding-right: 65rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
animation: slide-in-right .6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 4rpx;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
background: url(../../../static/img/back.png) 100%/100% no-repeat;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inCard {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 55rpx;
|
||||||
|
background-color: #FFF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
color: red;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 55rpx;
|
||||||
|
|
||||||
|
&.phone {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.bg-img {
|
.bg-img {
|
||||||
background-position: inherit;
|
background-position: inherit;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.hidden-2{
|
|
||||||
|
.hidden-2 {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
.swi-bg{
|
|
||||||
|
.swi-bg {
|
||||||
background-size: 770rpx;
|
background-size: 770rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes slide-in-right {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translateX(30rpx);
|
||||||
|
transform: translateX(30rpx);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
-webkit-transform: translateX(0);
|
||||||
|
transform: translateX(0);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,14 +23,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list menu ">
|
<view class="cu-list menu ">
|
||||||
<!-- <view class="cu-item arrow">
|
|
||||||
<view class="content">
|
|
||||||
微信账号
|
|
||||||
</view>
|
|
||||||
<view class="value">
|
|
||||||
{{userInfo.userWeChatAccount ?'已':'未'}}绑定
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="cu-item arrow" @tap="resMsg">
|
<view class="cu-item arrow" @tap="resMsg">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
订单状态通知
|
订单状态通知
|
||||||
@@ -39,14 +31,6 @@
|
|||||||
订阅
|
订阅
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="cu-item arrow">
|
|
||||||
<view class="content">
|
|
||||||
支付宝账号
|
|
||||||
</view>
|
|
||||||
<view class="value">
|
|
||||||
{{userInfo.userAliPayAccount?'已':'未'}}绑定
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list menu ">
|
<view class="cu-list menu ">
|
||||||
<view class="cu-item arrow">
|
<view class="cu-item arrow">
|
||||||
@@ -65,6 +49,14 @@
|
|||||||
{{userInfo.userPayPwdState?'已':'未'}}设置
|
{{userInfo.userPayPwdState?'已':'未'}}设置
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="cu-item arrow" @tap="jumpQRcode">
|
||||||
|
<view class="content">
|
||||||
|
收油码
|
||||||
|
</view>
|
||||||
|
<view class="value">
|
||||||
|
<image class="qrcode" src="../../static/img/erweima-grey.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list menu ">
|
<view class="cu-list menu ">
|
||||||
<view class="cu-item arrow">
|
<view class="cu-item arrow">
|
||||||
@@ -109,6 +101,11 @@
|
|||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
jumpQRcode() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/BagStation/pages/oilQRcode/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
resMsg() {
|
resMsg() {
|
||||||
wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
tmplIds: ['ZXdtqtVmzbJY0_A2Va6MBHDrRIKN99o5lSg8fU7f77c'],
|
tmplIds: ['ZXdtqtVmzbJY0_A2Va6MBHDrRIKN99o5lSg8fU7f77c'],
|
||||||
@@ -162,4 +159,11 @@
|
|||||||
.value {
|
.value {
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
position: relative;
|
||||||
|
top: 4rpx;
|
||||||
|
width: 42rpx;
|
||||||
|
height: 42rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
62
BagStation/pages/oilQRcode/index.vue
Normal file
62
BagStation/pages/oilQRcode/index.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
</cu-custom>
|
||||||
|
<view class="oil-qrcode">
|
||||||
|
<view class="info">
|
||||||
|
<view>肖师傅</view>
|
||||||
|
<view>13216655221</view>
|
||||||
|
<image></image>
|
||||||
|
</view>
|
||||||
|
<tki-qrcode ref="qrcode" cid="2" :val="qrcodeText" :size="400" onval showLoading loadMake />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import tkiQrcode from '@/BagStation/pages/components/tki-qrcode/tki-qrcode.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
tkiQrcode
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
qrcodeText:'13216655221'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.oil-qrcode {
|
||||||
|
height: 100vh;
|
||||||
|
padding-top: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
width: 400rpx;
|
||||||
|
padding: 20rpx 20rpx 20rpx 100rpx;
|
||||||
|
|
||||||
|
view {
|
||||||
|
&:nth-of-type(1) {}
|
||||||
|
|
||||||
|
&:nth-of-type(2) {
|
||||||
|
margin-top: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -322,6 +322,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/oilQRcode/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -333,7 +340,6 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="action" @tap="onTapUserInfo">
|
<view class="action" @tap="onTapUserInfo">
|
||||||
<text class="cuIcon-right text-lg"></text>
|
<text class="cuIcon-right text-lg"></text>
|
||||||
|
<image class="qrcode" src="../../../static/img/erweima-white.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -40,7 +41,10 @@
|
|||||||
<!-- <text class="icon-company cuIcon-crownfill padding-right-xs"></text> -->
|
<!-- <text class="icon-company cuIcon-crownfill padding-right-xs"></text> -->
|
||||||
<!-- <my-icon iconName="wd-qy-hy.png" class="padding-right-xs"></my-icon> -->
|
<!-- <my-icon iconName="wd-qy-hy.png" class="padding-right-xs"></my-icon> -->
|
||||||
<text class="icon-company text-xs">{{companyCard.name}}</text>
|
<text class="icon-company text-xs">{{companyCard.name}}</text>
|
||||||
<view :class="company_tag===1?'company_tag company_tag_SelfOperated':'company_tag company_tag_externalOperated'">{{companyCard.companyNature===1?'自营':'外请'}}</view>
|
<view
|
||||||
|
:class="company_tag===1?'company_tag company_tag_SelfOperated':'company_tag company_tag_externalOperated'">
|
||||||
|
{{companyCard.companyNature===1?'自营':'外请'}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -128,7 +132,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<SwitchEnterprises @submit='upadteCompanyCard' @logout='logout' :is-show.sync="isSwitchEnterprises"></SwitchEnterprises>
|
<SwitchEnterprises @submit='upadteCompanyCard' @logout='logout' :is-show.sync="isSwitchEnterprises">
|
||||||
|
</SwitchEnterprises>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -167,7 +172,7 @@
|
|||||||
this.upadteCompanyCard()
|
this.upadteCompanyCard()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout(){
|
logout() {
|
||||||
this.isSwitchEnterprises = false
|
this.isSwitchEnterprises = false
|
||||||
},
|
},
|
||||||
upadteCompanyCard() {
|
upadteCompanyCard() {
|
||||||
@@ -305,6 +310,19 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.action {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
position: absolute;
|
||||||
|
left: -3rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 34rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.company_tag_externalOperated {
|
.company_tag_externalOperated {
|
||||||
background: #FDDBDB;
|
background: #FDDBDB;
|
||||||
color: #FE0505;
|
color: #FE0505;
|
||||||
|
|||||||
BIN
static/img/back.png
Normal file
BIN
static/img/back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 621 B |
BIN
static/img/erweima-grey.png
Normal file
BIN
static/img/erweima-grey.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 791 B |
BIN
static/img/erweima-white.png
Normal file
BIN
static/img/erweima-white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 573 B |
Reference in New Issue
Block a user