更新
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
<view v-show="isTransfer" :class="isTransfer?'active':''" class="card-container second">
|
||||
<view class="inCard" @click="sweepCard">
|
||||
<text>扫码</text>
|
||||
<text>扫一扫</text>
|
||||
</view>
|
||||
<view class="inCard phone" @tap='gotocard'>
|
||||
<text>手机号码</text>
|
||||
@@ -57,6 +57,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/account.js'
|
||||
export default {
|
||||
filters: {
|
||||
companyType(e) {
|
||||
@@ -108,8 +109,17 @@
|
||||
sweepCard() {
|
||||
uni.scanCode({
|
||||
success: res => {
|
||||
console.log(res)
|
||||
let {} = res.result
|
||||
let result = JSON.parse(res.result)
|
||||
if (result.qrcodeText) {
|
||||
serve.checkQrStr(result.giveCustomerId, result.qrcodeText).then(res => {
|
||||
let currentCard = this.card || []
|
||||
this.$emit('buttomPopup', {
|
||||
...currentCard,
|
||||
...result
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<swiper-item v-for="(item,index) in cardList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<!-- <image :src="imgURL+ (item.type=='zs'?'card-zs.png':'card-other.png')" mode="aspectFill">
|
||||
</image> -->
|
||||
<oil-card :card="item"></oil-card>
|
||||
<oil-card :card="item" @buttomPopup="buttomPopup"></oil-card>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
@@ -89,15 +89,19 @@
|
||||
<view class="bg-white">
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</view>
|
||||
|
||||
<transBlcok ref="transBlcok" @reloadCard="getCards"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import transBlcok from '@/components/transBlock/index.vue'
|
||||
import oilCard from '../../components/oil-card/oil-card.vue'
|
||||
import accountApi from '@/api/account.js'
|
||||
export default {
|
||||
components: {
|
||||
oilCard
|
||||
oilCard,
|
||||
transBlcok
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -180,6 +184,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buttomPopup(result) {
|
||||
this.$refs.transBlcok._open(result)
|
||||
},
|
||||
getTotalOilCardInfo() {
|
||||
accountApi.getTotalOilCardInfo().then(res => {
|
||||
if (res.code == 20000) {
|
||||
@@ -226,7 +233,8 @@
|
||||
if (res.code == 20000) {
|
||||
if (res.data.length > 0) {
|
||||
|
||||
let staging = res.data.filter(item => item.companyType != 5).filter(item => !this.hideCard.includes(item
|
||||
let staging = res.data.filter(item => item.companyType != 5).filter(item => !this
|
||||
.hideCard.includes(item
|
||||
.companyId))
|
||||
staging.forEach(item => {
|
||||
this.$set(item, 'currentPage', 1)
|
||||
@@ -265,7 +273,9 @@
|
||||
for (let value of map.values()) {
|
||||
values.push(value)
|
||||
}
|
||||
values.sort((a,b)=>{return a - b})
|
||||
values.sort((a, b) => {
|
||||
return a - b
|
||||
})
|
||||
values.reverse()
|
||||
values.forEach(value => {
|
||||
keys.forEach(key => {
|
||||
@@ -347,7 +357,11 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
/deep/.vue-ref {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.boxsingForCard {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<template xlang="wxml" minapp="mpvue">
|
||||
<view class="tki-qrcode">
|
||||
<image src="https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油运营小程序/qr-bg.png" mode="" class="bgs"></image>
|
||||
<!-- #ifndef MP-ALIPAY -->
|
||||
<image v-if="isHaveBg" class="bgs" src="https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油运营小程序/qr-bg.png" />
|
||||
<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-ALIPAY -->
|
||||
<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
|
||||
<!-- #endif -->
|
||||
<image v-show="show" :src="result" class="erweima" :style="{width:cpSize+'px',height:cpSize+'px'}" />
|
||||
<!-- <canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" /> -->
|
||||
<!-- <image v-show="show" :src="result" class="erweima" :style="{width:cpSize+'px',height:cpSize+'px'}" /> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -41,15 +37,15 @@ export default {
|
||||
},
|
||||
background: {
|
||||
type: String,
|
||||
default: '#ffffff'
|
||||
default: '#fff'
|
||||
},
|
||||
foreground: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
default: '#000'
|
||||
},
|
||||
pdground: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
default: '#000'
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
@@ -83,6 +79,10 @@ export default {
|
||||
type: String,
|
||||
default: '二维码生成中'
|
||||
},
|
||||
isHaveBg: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -91,6 +91,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
_makeCode() {
|
||||
|
||||
let that = this
|
||||
if (!this._empty(this.val)) {
|
||||
qrcode = new QRCode({
|
||||
@@ -108,7 +109,7 @@ export default {
|
||||
image: that.icon, // 二维码图标
|
||||
imageSize: that.iconSize, // 二维码图标大小
|
||||
cbResult: function(res) { // 生成二维码的回调
|
||||
that._result(res)
|
||||
// that._result(res)
|
||||
},
|
||||
});
|
||||
} else {
|
||||
@@ -120,7 +121,7 @@ export default {
|
||||
}
|
||||
},
|
||||
_clearCode() {
|
||||
this._result('')
|
||||
// this._result('')
|
||||
qrcode.clear()
|
||||
},
|
||||
_saveCode() {
|
||||
@@ -204,11 +205,13 @@ export default {
|
||||
.tki-qrcode {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.erweima {
|
||||
padding: 2%;
|
||||
background: #ffff;
|
||||
border: 1px solid #f1f1f1;
|
||||
}
|
||||
|
||||
.bgs {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -222,19 +225,24 @@ export default {
|
||||
background-color: #ffffff;
|
||||
padding: 2%;
|
||||
}
|
||||
|
||||
.tki-qrcode {
|
||||
position: relative;
|
||||
padding: 8%;
|
||||
background-image:url('https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油运营小程序/qr-bg.png') ;
|
||||
background-repeat: no-repeat;
|
||||
/* background-image:url('https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油运营小程序/qr-bg.png') ; */
|
||||
}
|
||||
|
||||
.tki-qrcode-canvas {
|
||||
display: inline-block;
|
||||
background: 'transparent'
|
||||
}
|
||||
|
||||
/* .tki-qrcode-canvas {
|
||||
position: fixed;
|
||||
top: -99999upx;
|
||||
left: -99999upx;
|
||||
z-index: -99999;
|
||||
}
|
||||
image{
|
||||
|
||||
}
|
||||
} */
|
||||
image {}
|
||||
</style>
|
||||
|
||||
@@ -4,17 +4,24 @@
|
||||
<block slot="backText">返回</block>
|
||||
</cu-custom>
|
||||
<view class="oil-qrcode">
|
||||
<view class="round first"></view>
|
||||
<view class="card">
|
||||
<view class="info">
|
||||
<view>肖师傅</view>
|
||||
<view>13216655221</view>
|
||||
<image></image>
|
||||
<view>{{user.name || ''}}</view>
|
||||
<view>{{user.userPhone || ''}}</view>
|
||||
</view>
|
||||
<tki-qrcode ref="qrcode" cid="2" :val="qrcodeText" :size="400" onval showLoading loadMake />
|
||||
<tki-qrcode ref="qrcode" cid="2" :val="qrcodeText" :size="400" :isHaveBg="false" pdground="#000"
|
||||
foreground="#000" background="#fff" onval showLoading loadMake />
|
||||
<view class="tip">扫一扫上面的二维码图案,给我赠油,可截图保存。</view>
|
||||
<button class="button" @click="regeneration">重新生成</button>
|
||||
</view>
|
||||
<view class="tip-sec">注: 重新生成收油码后, 以前截图保存的收油码将作废!</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/account.js'
|
||||
import tkiQrcode from '@/BagStation/pages/components/tki-qrcode/tki-qrcode.vue'
|
||||
export default {
|
||||
components: {
|
||||
@@ -22,7 +29,29 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
qrcodeText:'13216655221'
|
||||
qrcodeText: '',
|
||||
user: uni.getStorageSync('user')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getQrStr()
|
||||
},
|
||||
methods: {
|
||||
getQrStr(reset = 0) {
|
||||
console.log('this.user', this.user)
|
||||
if (this.user.id) {
|
||||
serve.getQrStr(this.user.id, reset).then(res => {
|
||||
if (!res.data) return
|
||||
this.qrcodeText = JSON.stringify({
|
||||
giveCustomerId: this.user.id,
|
||||
qrcodeText: res.data
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
regeneration() {
|
||||
this.getQrStr(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,33 +59,70 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.round {}
|
||||
|
||||
.oil-qrcode {
|
||||
height: 100vh;
|
||||
height: calc(100vh - 87px);
|
||||
padding-top: 200rpx;
|
||||
text-align: center;
|
||||
background: #FF6700;
|
||||
|
||||
.card {
|
||||
margin: 0 auto;
|
||||
padding-top: 70rpx;
|
||||
padding-bottom: 50rpx;
|
||||
width: 598rpx;
|
||||
background: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
width: 400rpx;
|
||||
padding: 20rpx 20rpx 20rpx 100rpx;
|
||||
|
||||
view {
|
||||
&:nth-of-type(1) {}
|
||||
text-align: center;
|
||||
|
||||
&:nth-of-type(1) {
|
||||
color: #000;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
&:nth-of-type(2) {
|
||||
margin-top: 15rpx;
|
||||
margin-top: 10rpx;
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
.tip {
|
||||
margin-top: 70rpx;
|
||||
color: #9E9E9E;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin-top: 50rpx;
|
||||
margin-right: 53rpx;
|
||||
width: 172rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.tip-sec {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
bottom: 70rpx;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/deep/.tki-qrcode {
|
||||
margin-top: 71rpx;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -110,4 +110,16 @@ export default {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
getQrStr(id, reset) {
|
||||
return request({
|
||||
url: `/oil-user/oilCustomerInfo/getQrStr/${id}?reset=${reset}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
checkQrStr(id, qrStr) {
|
||||
return request({
|
||||
url: `/oil-user/oilCustomerInfo/checkQrStr/${id}?qrStr=${qrStr}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
240
components/transBlock/index.vue
Normal file
240
components/transBlock/index.vue
Normal file
@@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup ref="indexPopup" type="bottom">
|
||||
<view class="trans-block">
|
||||
<view class="title">请输入赠卡金额</view>
|
||||
<text>¥</text><input v-model="params.occurAmount" class="uni-input" type="digit"
|
||||
:placeholder=" '最多可以赠送'+ info.balance + '元'" />
|
||||
<button @click="sendTextMessage">确认赠卡</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<uni-popup ref="smscodePopup" type="center">
|
||||
<view class="poput_tip">
|
||||
<view :style="'background-image: url('+popupbg+ ');'" class="popup_header">短信身份验证</view>
|
||||
<view style="margin: 20rpx auto;width: 90%;">转出验证:本次转出需要短信确认,验证码 已发送至您的手机
|
||||
{{phoneHandle(this.user.userPhone)}}
|
||||
</view>
|
||||
<xt-verify-code class="code" v-model="params.code" @confirm="submit"></xt-verify-code>
|
||||
<button @click="send" class="oliout_butten"
|
||||
style="width:60%; border-radius: 50rpx;">{{time===0?'重新发送验证码':time+'S'}}
|
||||
</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<uni-popup ref="successPopupt" type="center">
|
||||
<view class="poput_tip">
|
||||
<view :style="'background-image: url('+popupbg+ ');'" class="popup_header">温馨提示</view>
|
||||
<view style="margin: 20rpx auto;width: 90%;text-align: center;">
|
||||
<view class="container_img">
|
||||
<image class="success_img" src="../../static/img/success.png"></image>
|
||||
</view>
|
||||
转出成功!
|
||||
</view>
|
||||
<button @click="$refs.successPopupt.close()" class="oliout_butten"
|
||||
style="width:60%; border-radius: 50rpx;">确认</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/account.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
popupbg: 'https://xoi-support.oss-cn-hangzhou.aliyuncs.com/web/cuscomtrac/popupbg.png',
|
||||
time: 0,
|
||||
price: '',
|
||||
info: {},
|
||||
user: uni.getStorageSync('user') || {},
|
||||
params: {
|
||||
occurAmount: '',
|
||||
code: '',
|
||||
verifyCodeToken: '',
|
||||
billType: 'OIL_DONATION',
|
||||
createSource: 'XOIL_DRIVER_WECHAT_APPLET',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
_open(item) {
|
||||
if (item) {
|
||||
console.log('itemitemitemitem', item)
|
||||
this.params.occurAmount = ''
|
||||
this.info = item
|
||||
this.$refs.indexPopup.open()
|
||||
}
|
||||
},
|
||||
sendTextMessage() {
|
||||
if (!this.submitCheck()) return
|
||||
|
||||
if (this.time === 0) {
|
||||
this.params.code = ''
|
||||
this.params.verifyCodeToken = ''
|
||||
serve.giveCard({
|
||||
phone: this.user.userPhone
|
||||
}).then(res => {
|
||||
this.time = 60
|
||||
this.params.verifyCodeToken = res.data.verifyCodeToken
|
||||
this.timefn()
|
||||
this.$refs.smscodePopup.open()
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
submitCheck() {
|
||||
let {
|
||||
occurAmount
|
||||
} = this.params
|
||||
if (!occurAmount) {
|
||||
uni.showToast({
|
||||
title: '请输入赠送金额',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (occurAmount > this.info.balance) {
|
||||
uni.showToast({
|
||||
title: '超过最多赠送金额',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (occurAmount < 5) {
|
||||
uni.showToast({
|
||||
title: '赠送金额不可低于5元',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
return true
|
||||
},
|
||||
submit() {
|
||||
let {
|
||||
giveCustomerId, //收款方
|
||||
companyId, //付款方
|
||||
accountCardCode //付款方
|
||||
} = this.info
|
||||
|
||||
serve.oilCustomerAccountRecord({
|
||||
giveCustomerId,
|
||||
givePhone: '',
|
||||
companyId,
|
||||
payerCustomerId: this.user.id,
|
||||
accountCardCode,
|
||||
...this.params
|
||||
}).then(res => {
|
||||
this.$refs.indexPopup.close()
|
||||
this.$refs.smscodePopup.close()
|
||||
this.$refs.successPopupt.open()
|
||||
this.$emit('reloadCard')
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
phoneHandle(e) {
|
||||
return e.substr(0, 3) + "****" + e.substr(7);
|
||||
},
|
||||
|
||||
timefn() {
|
||||
if (this.time !== 0) {
|
||||
this.time--
|
||||
setTimeout(() => {
|
||||
this.timefn()
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.poput_tip {
|
||||
width: 85vw;
|
||||
height: 40vh;
|
||||
background-color: #F8F8F8;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popup_header {
|
||||
height: 20%;
|
||||
width: 100%;
|
||||
background-color: #FE0505;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-size: 100% 30vh;
|
||||
}
|
||||
|
||||
.container_img {
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
|
||||
// .xt__verify-code .xt__input-ground .xt__box-box.data-v-e4b72d00 {
|
||||
// height: 100rpx !important;
|
||||
// }
|
||||
|
||||
// .xt__verify-code {
|
||||
// width: 90% !important;
|
||||
// margin: 0 auto !important;
|
||||
// }
|
||||
|
||||
.oliout_butten {
|
||||
width: 90vw;
|
||||
margin: 0 auto;
|
||||
background-color: #FE0505;
|
||||
margin-top: 60rpx;
|
||||
color: #F0F0F0;
|
||||
}
|
||||
|
||||
.trans-block {
|
||||
padding: 54rpx 43rpx 0 63rpx;
|
||||
width: 100%;
|
||||
height: 679rpx;
|
||||
background: #FFF;
|
||||
border-radius: 15rpx 15rpx 0 0;
|
||||
|
||||
.title {
|
||||
margin-bottom: 35rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 550;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
>text {
|
||||
position: relative;
|
||||
top: -10rpx;
|
||||
font-size: 42rpx;
|
||||
font-weight: 550;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
>input {
|
||||
display: inline-block;
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
>button {
|
||||
margin-top: 320rpx;
|
||||
width: 441rpx;
|
||||
height: 89rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
text-align: center;
|
||||
background: #FF6700;
|
||||
border-radius: 10rpx
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -159,10 +159,12 @@
|
||||
</view>
|
||||
<msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models>
|
||||
<three-sites @hideOneModal="showThreeSites=false" :showThreeSites="showThreeSites"></three-sites>
|
||||
<transBlcok ref="transBlcok" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import transBlcok from '@/components/transBlock/index.vue'
|
||||
import SwitchEnterprises from '@/components/SwitchEnterprises.vue'
|
||||
import msgModels from '../../components/showModels.vue'
|
||||
import accountApi from '@/api/account.js'
|
||||
@@ -176,7 +178,8 @@
|
||||
siteItem,
|
||||
threeSites,
|
||||
msgModels,
|
||||
SwitchEnterprises
|
||||
SwitchEnterprises,
|
||||
transBlcok
|
||||
// slFilter
|
||||
},
|
||||
data() {
|
||||
@@ -331,10 +334,7 @@
|
||||
onReady() {
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
console.log('这里是onShow', IsOtherUser, '++++++')
|
||||
if (IsOtherUser) {
|
||||
console.log('首页 卡力 进入')
|
||||
uni.showToast({
|
||||
title: '卡力用户只支持跳转登录',
|
||||
icon: 'none'
|
||||
@@ -350,10 +350,7 @@
|
||||
this.refreshLocation()
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
console.log('这里是onShow', IsOtherUser, '++++++')
|
||||
if (IsOtherUser) {
|
||||
console.log('首页 卡力 进入')
|
||||
uni.showToast({
|
||||
title: '卡力用户只支持跳转登录',
|
||||
icon: 'none'
|
||||
@@ -363,15 +360,13 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log('首页 非卡力 进入')
|
||||
},
|
||||
onLoad(e) {
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
// console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
// console.log('这里是onLoad', IsOtherUser, '++++++')
|
||||
|
||||
if (IsOtherUser) {
|
||||
console.log('首页 卡力 进入')
|
||||
// 卡力
|
||||
uni.showToast({
|
||||
title: '卡力用户只支持跳转登录',
|
||||
icon: 'none'
|
||||
@@ -381,7 +376,7 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
// console.log('首页 非卡力 进入测试++')
|
||||
//非卡力
|
||||
this.reverseGeocoder(this.location);
|
||||
setTimeout(() => {
|
||||
let startParamsData = uni.getStorageSync('isJump') || null;
|
||||
@@ -417,20 +412,12 @@
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
// uni.navigateTo({
|
||||
// url: `/BagStation/pages/stationDetail/stieQr?siteId=1372099296709754880&activeChannelCode=XOIL`
|
||||
// })
|
||||
// uni.redirectTo({
|
||||
// url:'/BagStation/pages/makeOrder/makeOrder'
|
||||
// // url:'/BagStation/pages/makeOrder/payResult?status=success'
|
||||
// })
|
||||
// url:'/BagStation/pages/makeOrder/payResult?status=success'
|
||||
this.getSiteList();
|
||||
},
|
||||
mounted() {},
|
||||
beforeCreate() {},
|
||||
onReady() {
|
||||
// this.getSiteList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
swiperClick(item, index) {
|
||||
@@ -475,33 +462,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// refreshLocation() {
|
||||
// wx.showLoading({
|
||||
// title: '定位中...',
|
||||
// mask: true,
|
||||
// })
|
||||
// return new Promise((resolve, reject) => {
|
||||
// let _locationChangeFn = (res) => {
|
||||
// console.log('location change', res)
|
||||
// uni.setStorageSync('location', res)
|
||||
// this.getSiteList();
|
||||
// wx.hideLoading()
|
||||
// wx.offLocationChange(_locationChangeFn)
|
||||
// }
|
||||
// wx.startLocationUpdate({
|
||||
// success: (res) => {
|
||||
// console.log(res);
|
||||
// wx.onLocationChange(_locationChangeFn)
|
||||
// resolve()
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log('获取当前位置失败', err)
|
||||
// wx.hideLoading()
|
||||
// reject()
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
|
||||
refreshLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
@@ -509,7 +470,6 @@
|
||||
uni.setStorageSync('location', res)
|
||||
},
|
||||
complete: (res) => {
|
||||
// console.log('定位',res)
|
||||
this.getSiteList()
|
||||
var msgTip = ''
|
||||
if (res.errMsg == 'getLocation:fail auth deny') {
|
||||
@@ -534,7 +494,6 @@
|
||||
if (this.showAuthFrzen <= new Date().getTime()) {
|
||||
// 一小时后再提示
|
||||
uni.setStorageSync('showAuthFrzen', new Date().getTime() + 10 * 1000)
|
||||
// uni.setStorageSync('showAuthFrzen', new Date().getTime() + 1 * 60 * 60 * 1000)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -543,8 +502,6 @@
|
||||
if (res.code === 20000) {
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
// console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
// console.log('这里是getUserAuthInfo', IsOtherUser, '++++++')
|
||||
if (IsOtherUser) {
|
||||
uni.showToast({
|
||||
title: '卡力用户只支持跳转登录',
|
||||
@@ -584,27 +541,13 @@
|
||||
})
|
||||
},
|
||||
shadoumeiyou(index) {
|
||||
// if(!uni.getStorageSync('user')){
|
||||
// uni.showToast({
|
||||
// title:'请先登登录',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
|
||||
if (index == 0) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/station/stationList'
|
||||
})
|
||||
} else if (index == 1) {
|
||||
// const referer = '星油云'; //调用插件的app的名称
|
||||
// const endPoint = JSON.stringify({
|
||||
// name: '输入目的地',
|
||||
// latitude: 39.89631551,
|
||||
// longitude: 116.323459711
|
||||
// });
|
||||
// wx.navigateTo({
|
||||
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
||||
// '&endPoint=' + endPoint
|
||||
// })
|
||||
|
||||
if (!uni.getStorageSync('user')) {
|
||||
uni.showModal({
|
||||
title: '请您登录',
|
||||
@@ -623,19 +566,13 @@
|
||||
uni.removeStorageSync("origins")
|
||||
uni.removeStorageSync("destination")
|
||||
wx.navigateTo({
|
||||
// url:'../../../BagStation/pages/routePlain/routePlain',
|
||||
|
||||
url: '../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
|
||||
// url:'../../../BagStation/pages/overviewMap/overviewMap',
|
||||
|
||||
})
|
||||
} else if (index == 9) {
|
||||
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
||||
}
|
||||
// else if(index==8){
|
||||
// uni.navigateTo({
|
||||
// url: '/BagStation/myCars/myCars'
|
||||
// })
|
||||
// }
|
||||
else if (index == 2) {
|
||||
} else if (index == 2) {
|
||||
if (!uni.getStorageSync('user')) {
|
||||
uni.showModal({
|
||||
title: '请您登录',
|
||||
@@ -652,8 +589,7 @@
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
// url:'../../../BagStation/pages/routePlain/routePlain',
|
||||
// url:'../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
|
||||
|
||||
url: '../../../BagStation/pages/overviewMap/overviewMap',
|
||||
})
|
||||
} else if (index == 6) {
|
||||
@@ -809,23 +745,13 @@
|
||||
uni.setStorageSync('OtherSiteInfo', item)
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?channerCode=${item.channelCode}`,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
success: () => {
|
||||
// console.log('err')
|
||||
}
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
success: () => {
|
||||
// console.log('err')
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
@@ -948,8 +874,26 @@
|
||||
uni.scanCode({
|
||||
scanType: 'qrCode',
|
||||
onlyFromCamera: true,
|
||||
success: (res) => {
|
||||
console.log(res.result)
|
||||
success: async (res) => {
|
||||
if (typeof res.result === 'string') {
|
||||
let result = JSON.parse(res.result)
|
||||
if (result.qrcodeText) {
|
||||
let accountResult = await accountApi.getUserAccount()
|
||||
if (accountResult.data.length) {
|
||||
accountApi.checkQrStr(result.giveCustomerId, result.qrcodeText).then(
|
||||
res => {
|
||||
let currentCard = accountResult.data[0] || []
|
||||
this.$refs.transBlcok._open({
|
||||
...currentCard,
|
||||
...result
|
||||
})
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
this.getScanRes(res.result)
|
||||
return
|
||||
}
|
||||
this.getScanRes(res.result)
|
||||
},
|
||||
fail: (err) => {
|
||||
@@ -982,6 +926,10 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/.vue-ref {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.showBtn {
|
||||
padding-right: 3%;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,8 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.xt__verify-code {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
|
||||
.xt__input {
|
||||
|
||||
@@ -5,7 +5,7 @@ import utils from '@/utils/encode'
|
||||
// const env = 'test'
|
||||
const env = 'production'
|
||||
// 45
|
||||
const testUrl = 'http://192.168.1.132:38080'
|
||||
const testUrl = 'http://192.168.1.83:38080'
|
||||
// const productUrl = 'https://www.xingoil.com/adminapi'
|
||||
|
||||
const productUrl = 'http://uat.xingoil.com/adminapi'
|
||||
@@ -125,6 +125,7 @@ service.interceptors.response.use(
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
return Promise.reject()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user