|
@@ -93,10 +93,10 @@
|
|
|
</view>
|
|
|
<view class="text-2" v-if="station.stationType==50" >
|
|
|
可进行充电
|
|
|
- </view>
|
|
|
- <view class="text-2" v-else >
|
|
|
- {{isInsert?'充电枪已连接,可进行充电':'未检测到充电枪,若已插枪,请拔出重插'}}
|
|
|
-
|
|
|
+ </view>
|
|
|
+ <view class="text-2" v-else >
|
|
|
+ {{isInsert?'充电枪已连接,可进行充电':'未检测到充电枪,若已插枪,请拔出重插'}}
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -201,7 +201,7 @@
|
|
|
</view> -->
|
|
|
<view class="content" :style="canUse?'':'color: red;'" >
|
|
|
|
|
|
- {{canUse?'充电服务费月卡':'此充电站不支持月卡服务'}}
|
|
|
+ {{canUse?'充电月卡':'此充电站不支持月卡服务'}}
|
|
|
|
|
|
</view>
|
|
|
|
|
@@ -227,7 +227,7 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
-<!-- <p class="carp" v-if="carplateMust" >充电车辆车牌号一致则减免停车费</p>
|
|
|
+<!-- <p class="carp" v-if="carplateMust" >充电车辆车牌号一致则减免停车费</p>
|
|
|
-->
|
|
|
<view class="bottom">
|
|
|
|
|
@@ -278,82 +278,82 @@
|
|
|
:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone"
|
|
|
:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- <u-modal v-model="showNt" class="showOss2"
|
|
|
- :show-title="false" :show-confirm-button="false" >
|
|
|
- <view class="slot-content">
|
|
|
-
|
|
|
- <u-image width="600" style="margin: auto;min-height: 250px;"
|
|
|
- mode="widthFix"
|
|
|
- v-show="showNtStep==0"
|
|
|
- src="@/assets/img/nt/news-activity-2.png">
|
|
|
-
|
|
|
- <view slot="loading" style="height: 200px;" >
|
|
|
- <u-loading mode="flower" size="186" >
|
|
|
-
|
|
|
- </u-loading>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- </u-image>
|
|
|
- <view
|
|
|
- style="color: #ecc07d;
|
|
|
- font-size: 64rpx;
|
|
|
- position: relative;
|
|
|
- top: -220rpx;
|
|
|
- right: -100rpx; width: 400rpx;"
|
|
|
- @click="showNtStepClick"
|
|
|
-
|
|
|
- v-show="showNtStep==0" >
|
|
|
- <span >.</span>
|
|
|
- </view>
|
|
|
-
|
|
|
- <u-image width="600" style="margin: auto;min-height: 250px;"
|
|
|
- mode="widthFix"
|
|
|
- v-show="showNtStep==1"
|
|
|
- src="@/assets/img/nt/news-activity-1.png">
|
|
|
-
|
|
|
- </u-image>
|
|
|
- <view
|
|
|
- style="color: #FFFFFF;
|
|
|
- font-size: 64rpx;
|
|
|
- position: relative;
|
|
|
- top: -600rpx;
|
|
|
- right: -80rpx;"
|
|
|
- :style="{
|
|
|
- right:showNtValue>99?'-80rpx':(showNtValue>9?'-95rpx':'-110rpx')
|
|
|
- }"
|
|
|
- v-show="showNtStep==1" ><b>{{showNtValue}}</b>
|
|
|
- <span style="font-size: 28rpx;">元</span>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view
|
|
|
- style="color: #ecc07d;
|
|
|
- font-size: 72rpx;
|
|
|
- position: relative;
|
|
|
- top: -290rpx;
|
|
|
- right: -144rpx; width: 310rpx;"
|
|
|
- @click="showNtStepClick"
|
|
|
-
|
|
|
- v-show="showNtStep==1" >
|
|
|
- <span >.</span>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- </view>
|
|
|
- </u-modal>
|
|
|
-
|
|
|
-
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <u-modal v-model="showNt" class="showOss2"
|
|
|
+ :show-title="false" :show-confirm-button="false" >
|
|
|
+ <view class="slot-content">
|
|
|
+
|
|
|
+ <u-image width="600" style="margin: auto;min-height: 250px;"
|
|
|
+ mode="widthFix"
|
|
|
+ v-show="showNtStep==0"
|
|
|
+ src="@/assets/img/nt/news-activity-2.png">
|
|
|
+
|
|
|
+ <view slot="loading" style="height: 200px;" >
|
|
|
+ <u-loading mode="flower" size="186" >
|
|
|
+
|
|
|
+ </u-loading>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </u-image>
|
|
|
+ <view
|
|
|
+ style="color: #ecc07d;
|
|
|
+ font-size: 64rpx;
|
|
|
+ position: relative;
|
|
|
+ top: -220rpx;
|
|
|
+ right: -100rpx; width: 400rpx;"
|
|
|
+ @click="showNtStepClick"
|
|
|
+
|
|
|
+ v-show="showNtStep==0" >
|
|
|
+ <span >.</span>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <u-image width="600" style="margin: auto;min-height: 250px;"
|
|
|
+ mode="widthFix"
|
|
|
+ v-show="showNtStep==1"
|
|
|
+ src="@/assets/img/nt/news-activity-1.png">
|
|
|
+
|
|
|
+ </u-image>
|
|
|
+ <view
|
|
|
+ style="color: #FFFFFF;
|
|
|
+ font-size: 64rpx;
|
|
|
+ position: relative;
|
|
|
+ top: -600rpx;
|
|
|
+ right: -80rpx;"
|
|
|
+ :style="{
|
|
|
+ right:showNtValue>99?'-80rpx':(showNtValue>9?'-95rpx':'-110rpx')
|
|
|
+ }"
|
|
|
+ v-show="showNtStep==1" ><b>{{showNtValue}}</b>
|
|
|
+ <span style="font-size: 28rpx;">元</span>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view
|
|
|
+ style="color: #ecc07d;
|
|
|
+ font-size: 72rpx;
|
|
|
+ position: relative;
|
|
|
+ top: -290rpx;
|
|
|
+ right: -144rpx; width: 310rpx;"
|
|
|
+ @click="showNtStepClick"
|
|
|
+
|
|
|
+ v-show="showNtStep==1" >
|
|
|
+ <span >.</span>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import * as API_index from '@/apis/index.js'
|
|
|
- import * as API from "@/apis/chargeProcess.js"
|
|
|
- import * as userApi from '@/apis/user.js'
|
|
|
+ import * as API from "@/apis/chargeProcess.js"
|
|
|
+ import * as userApi from '@/apis/user.js'
|
|
|
import ucarkeyboard from '@/components/Ucarkeyboard.vue'
|
|
|
|
|
|
import {
|
|
@@ -373,9 +373,9 @@
|
|
|
form: {
|
|
|
carNum: '鄂',
|
|
|
defaultFlag: true,
|
|
|
- },
|
|
|
- showNt:false,
|
|
|
- showNtStep:0,
|
|
|
+ },
|
|
|
+ showNt:false,
|
|
|
+ showNtStep:0,
|
|
|
showNtValue:30,
|
|
|
station:{},
|
|
|
step:0,
|
|
@@ -386,7 +386,7 @@
|
|
|
car: {},
|
|
|
isback: false,
|
|
|
gun: {},
|
|
|
- prices: {},
|
|
|
+ prices: {},
|
|
|
personInfo:{},
|
|
|
price: {
|
|
|
costPrice:0,
|
|
@@ -821,112 +821,112 @@
|
|
|
},
|
|
|
isInsertBtn(){
|
|
|
this.isInsert=true;
|
|
|
- },
|
|
|
- getNewYear(){
|
|
|
- //var obj=this.carhelp.get("newyear_activity2023")
|
|
|
- //
|
|
|
- var sz=["1615623336912621569","1615623336912621568"];
|
|
|
- var code=parseInt(Math.random()*2)
|
|
|
- this.carhelp.set("newyear_activity2023",{
|
|
|
- nt:sz[code],
|
|
|
- code:code,
|
|
|
- status:0
|
|
|
- })
|
|
|
-
|
|
|
- //先查询另一个领取过没
|
|
|
- userApi.exchangeDetail({
|
|
|
- key: sz[code==0?1:0]
|
|
|
- }).then((res) => {
|
|
|
-
|
|
|
- if(!res.data.enabled){
|
|
|
-
|
|
|
- if(res.data.code==2){
|
|
|
- //未开始
|
|
|
- }else{
|
|
|
- //已经结束
|
|
|
- }
|
|
|
- this.getBannerInfoTop("home-top");
|
|
|
-
|
|
|
- }else if(res.data.status==1){
|
|
|
- this.getBannerInfoTop("home-top");
|
|
|
- //已经兑换,或者不能兑换
|
|
|
- } else if(res.data.status==2){
|
|
|
- // this.showNtValue=res.data.totalDiscount
|
|
|
- this.exchangeDetail(sz[code]);
|
|
|
- }else{
|
|
|
- //res.data.status==0
|
|
|
- //this.showNtValue=res.data.totalDiscount
|
|
|
- this.exchangeDetail(sz[code],sz[code==0?1:0]);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- this.showNt=false;
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- exchangeDetail(exchangeCode,code2) {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
- userApi.exchangeDetail({
|
|
|
- key: exchangeCode
|
|
|
- }).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
- //
|
|
|
-
|
|
|
- if(!res.data.enabled){
|
|
|
-
|
|
|
- if(res.data.code==2){
|
|
|
- //未开始
|
|
|
- }else{
|
|
|
- //已经结束
|
|
|
- }
|
|
|
- this.getBannerInfoTop("home-top");
|
|
|
- }else if(res.data.status==1){
|
|
|
- this.getBannerInfoTop("home-top");
|
|
|
- //已经兑换,
|
|
|
- }else if(res.data.status==2){
|
|
|
-
|
|
|
- if(code2){
|
|
|
- //试试另一张卷
|
|
|
-
|
|
|
- var c=this.carhelp.get("newyear_activity2023")
|
|
|
- if(c){
|
|
|
- this.carhelp.set("newyear_activity2023",{
|
|
|
- nt:code2,
|
|
|
- code:c.code==0?1:0,
|
|
|
- status:0
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- this.exchangeDetail(code2)
|
|
|
- }else{
|
|
|
- this.getBannerInfoTop("home-top");
|
|
|
- }
|
|
|
-
|
|
|
- //不能兑换
|
|
|
- }else{
|
|
|
-
|
|
|
- this.showNt=true
|
|
|
- this.showNtStep=0;
|
|
|
- this.showNtValue=res.data.totalDiscount
|
|
|
- }
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- this.showNt=false;
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
+ },
|
|
|
+ getNewYear(){
|
|
|
+ //var obj=this.carhelp.get("newyear_activity2023")
|
|
|
+ //
|
|
|
+ var sz=["1615623336912621569","1615623336912621568"];
|
|
|
+ var code=parseInt(Math.random()*2)
|
|
|
+ this.carhelp.set("newyear_activity2023",{
|
|
|
+ nt:sz[code],
|
|
|
+ code:code,
|
|
|
+ status:0
|
|
|
+ })
|
|
|
+
|
|
|
+ //先查询另一个领取过没
|
|
|
+ userApi.exchangeDetail({
|
|
|
+ key: sz[code==0?1:0]
|
|
|
+ }).then((res) => {
|
|
|
+
|
|
|
+ if(!res.data.enabled){
|
|
|
+
|
|
|
+ if(res.data.code==2){
|
|
|
+ //未开始
|
|
|
+ }else{
|
|
|
+ //已经结束
|
|
|
+ }
|
|
|
+ this.getBannerInfoTop("home-top");
|
|
|
+
|
|
|
+ }else if(res.data.status==1){
|
|
|
+ this.getBannerInfoTop("home-top");
|
|
|
+ //已经兑换,或者不能兑换
|
|
|
+ } else if(res.data.status==2){
|
|
|
+ // this.showNtValue=res.data.totalDiscount
|
|
|
+ this.exchangeDetail(sz[code]);
|
|
|
+ }else{
|
|
|
+ //res.data.status==0
|
|
|
+ //this.showNtValue=res.data.totalDiscount
|
|
|
+ this.exchangeDetail(sz[code],sz[code==0?1:0]);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ this.showNt=false;
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ exchangeDetail(exchangeCode,code2) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ userApi.exchangeDetail({
|
|
|
+ key: exchangeCode
|
|
|
+ }).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ //
|
|
|
+
|
|
|
+ if(!res.data.enabled){
|
|
|
+
|
|
|
+ if(res.data.code==2){
|
|
|
+ //未开始
|
|
|
+ }else{
|
|
|
+ //已经结束
|
|
|
+ }
|
|
|
+ this.getBannerInfoTop("home-top");
|
|
|
+ }else if(res.data.status==1){
|
|
|
+ this.getBannerInfoTop("home-top");
|
|
|
+ //已经兑换,
|
|
|
+ }else if(res.data.status==2){
|
|
|
+
|
|
|
+ if(code2){
|
|
|
+ //试试另一张卷
|
|
|
+
|
|
|
+ var c=this.carhelp.get("newyear_activity2023")
|
|
|
+ if(c){
|
|
|
+ this.carhelp.set("newyear_activity2023",{
|
|
|
+ nt:code2,
|
|
|
+ code:c.code==0?1:0,
|
|
|
+ status:0
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.exchangeDetail(code2)
|
|
|
+ }else{
|
|
|
+ this.getBannerInfoTop("home-top");
|
|
|
+ }
|
|
|
+
|
|
|
+ //不能兑换
|
|
|
+ }else{
|
|
|
+
|
|
|
+ this.showNt=true
|
|
|
+ this.showNtStep=0;
|
|
|
+ this.showNtValue=res.data.totalDiscount
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ this.showNt=false;
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
getTemporaryCarNumByOpenId(){
|
|
|
try{
|
|
@@ -963,69 +963,69 @@
|
|
|
//TODO handle the exception
|
|
|
console.log("errorerrorerrorerrorerror")
|
|
|
}
|
|
|
- },
|
|
|
- redeemNow(exchangeCode) {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
- userApi.exchange({
|
|
|
- key: exchangeCode
|
|
|
- }).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
- this.showNtStep=1
|
|
|
- this.carhelp.set("newyear_activity2023",{
|
|
|
- nt:exchangeCode,
|
|
|
- status:1
|
|
|
- })
|
|
|
- }).catch(error => {
|
|
|
- this.showNt=false;
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- showNtStepClick(){
|
|
|
- if(this.showNtStep==0){
|
|
|
- var obj=this.carhelp.get("newyear_activity2023")
|
|
|
-
|
|
|
-
|
|
|
- if(this.personInfo.userType!=1){
|
|
|
- this.redeemNow(obj.nt)
|
|
|
- }else{
|
|
|
- this.showNt=false;
|
|
|
- uni.showModal({
|
|
|
- title:"提示",
|
|
|
- content:"游客无法兑换,请先注册为会员后再兑换",
|
|
|
- confirmText:"前往注册",
|
|
|
- success: res1 => {
|
|
|
- if (res1.confirm) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/login/login'
|
|
|
- })
|
|
|
- } else if (res1.cancel) {
|
|
|
- //('用户点击取消');
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }else if(this.showNtStep==1||this.showNtStep==2||this.showNtStep==3||this.showNtStep==4){
|
|
|
- this.showNt=false;
|
|
|
- uni.navigateTo({
|
|
|
- url:"/pages/user/coupon/myCoupon"
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- getBannerInfoTop(){
|
|
|
- var personInfo=this.carhelp.getPersonInfo()
|
|
|
-
|
|
|
- if(personInfo&&personInfo.userType=="1"){
|
|
|
- this.showVin=true
|
|
|
- }
|
|
|
+ },
|
|
|
+ redeemNow(exchangeCode) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ userApi.exchange({
|
|
|
+ key: exchangeCode
|
|
|
+ }).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.showNtStep=1
|
|
|
+ this.carhelp.set("newyear_activity2023",{
|
|
|
+ nt:exchangeCode,
|
|
|
+ status:1
|
|
|
+ })
|
|
|
+ }).catch(error => {
|
|
|
+ this.showNt=false;
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showNtStepClick(){
|
|
|
+ if(this.showNtStep==0){
|
|
|
+ var obj=this.carhelp.get("newyear_activity2023")
|
|
|
+
|
|
|
+
|
|
|
+ if(this.personInfo.userType!=1){
|
|
|
+ this.redeemNow(obj.nt)
|
|
|
+ }else{
|
|
|
+ this.showNt=false;
|
|
|
+ uni.showModal({
|
|
|
+ title:"提示",
|
|
|
+ content:"游客无法兑换,请先注册为会员后再兑换",
|
|
|
+ confirmText:"前往注册",
|
|
|
+ success: res1 => {
|
|
|
+ if (res1.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ })
|
|
|
+ } else if (res1.cancel) {
|
|
|
+ //('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if(this.showNtStep==1||this.showNtStep==2||this.showNtStep==3||this.showNtStep==4){
|
|
|
+ this.showNt=false;
|
|
|
+ uni.navigateTo({
|
|
|
+ url:"/pages/user/coupon/myCoupon"
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getBannerInfoTop(){
|
|
|
+ var personInfo=this.carhelp.getPersonInfo()
|
|
|
+
|
|
|
+ if(personInfo&&personInfo.userType=="1"){
|
|
|
+ this.showVin=true
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -1050,26 +1050,26 @@
|
|
|
if (op.id) {
|
|
|
this.id = op.id
|
|
|
|
|
|
- var personInfo=this.carhelp.getPersonInfo()
|
|
|
- this.personInfo=personInfo
|
|
|
- var userInfo= this.carhelp.getPersonInfo();
|
|
|
-
|
|
|
- if(userInfo&&userInfo.id){
|
|
|
-
|
|
|
- //this.getNewYear()
|
|
|
- }else{
|
|
|
- //this.getBannerInfoTop("home-top");
|
|
|
- }
|
|
|
- this.getBannerInfoTop("home-top");
|
|
|
- // var obj=this.carhelp.get("newyear_activity2023")
|
|
|
- // if(obj==null||obj==""||(obj&&obj.status==0)){
|
|
|
-
|
|
|
-
|
|
|
- // //this.showNtStep=2
|
|
|
- // }else{
|
|
|
- // this.getBannerInfoTop("home-top");
|
|
|
+ var personInfo=this.carhelp.getPersonInfo()
|
|
|
+ this.personInfo=personInfo
|
|
|
+ var userInfo= this.carhelp.getPersonInfo();
|
|
|
+
|
|
|
+ if(userInfo&&userInfo.id){
|
|
|
+
|
|
|
+ //this.getNewYear()
|
|
|
+ }else{
|
|
|
+ //this.getBannerInfoTop("home-top");
|
|
|
+ }
|
|
|
+ this.getBannerInfoTop("home-top");
|
|
|
+ // var obj=this.carhelp.get("newyear_activity2023")
|
|
|
+ // if(obj==null||obj==""||(obj&&obj.status==0)){
|
|
|
+
|
|
|
+
|
|
|
+ // //this.showNtStep=2
|
|
|
+ // }else{
|
|
|
+ // this.getBannerInfoTop("home-top");
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1344,10 +1344,10 @@
|
|
|
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
- }
|
|
|
- .showOss2{
|
|
|
- /deep/.u-model,/deep/.u-mode-center-box{
|
|
|
- background-color: transparent;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .showOss2{
|
|
|
+ /deep/.u-model,/deep/.u-mode-center-box{
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|