Commit 5de34c12 authored by lijiongliang's avatar lijiongliang

页面修改

parent 12d9313b
...@@ -52,6 +52,24 @@ ...@@ -52,6 +52,24 @@
<image src="@/static/index/index8.png"></image> <image src="@/static/index/index8.png"></image>
</div> </div>
<u-gap bgColor="transparent" height="60"></u-gap> <u-gap bgColor="transparent" height="60"></u-gap>
<!-- 已领取优惠券后弹框 -->
<view class="pooup-get-coupon" v-if="pooupCoupon">
<view class="coupon-box">
<image src="../../../static/index/coupon3.png"></image>
<view class="title">
<view style="margin-bottom:10rpx;font-weight: bold;">
您无优惠券可用
</view>
<view class="">
正在跳转中......({{timerNum}}秒)
</view>
</view>
<view class="coupon-btn" @click="goBuy">
去原价购买
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -68,6 +86,8 @@ ...@@ -68,6 +86,8 @@
//免费挪车码 //免费挪车码
freeCode: {}, freeCode: {},
carList:[], // 爱车列表 carList:[], // 爱车列表
pooupCoupon:false,
timerNum:3
}; };
}, },
methods: { methods: {
...@@ -105,14 +125,24 @@ ...@@ -105,14 +125,24 @@
let freeMoveFlag = res.data.data.freeMoveFlag let freeMoveFlag = res.data.data.freeMoveFlag
if (freeMoveFlag) { if (freeMoveFlag) {
uni.showToast({ // uni.showToast({
title: "您的免费领取次数已用完", // title: "您的免费领取次数已用完",
icon: 'none', // icon: 'none',
duration: 2000, // duration: 2000,
success:function(){ // success:function(){
// }
// });
this.pooupCoupon = true
let timer = setInterval(()=>{
if(this.timerNum > 0){
this.timerNum --
}else{
this.pooupCoupon = false
this.timerNum = 3
clearInterval(timer)
} }
}); },1000)
} else { } else {
//跳转到领取优惠卷页面 //跳转到领取优惠卷页面
// uni.navigateTo({ // uni.navigateTo({
...@@ -126,6 +156,11 @@ ...@@ -126,6 +156,11 @@
} }
}) })
}, },
// 已领取优惠券按钮
goBuy(){
this.pooupCoupon = false
console.log("去购买11111")
},
getMoveCode() { getMoveCode() {
let opts = { let opts = {
url: '/app/index/free/code', url: '/app/index/free/code',
...@@ -178,7 +213,7 @@ ...@@ -178,7 +213,7 @@
this.carList = res.data this.carList = res.data
uni.hideLoading() uni.hideLoading()
if(res.data.length == 0){ if(res.data.length == 0){
let url = "car.m.jd.com/h5/list.html?source=managerprocedure" let url = "car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure"
util.redirectToH5({page:url}) util.redirectToH5({page:url})
uni.setStorageSync('firstCoupon',true) uni.setStorageSync('firstCoupon',true)
}else{ }else{
...@@ -386,5 +421,47 @@ ...@@ -386,5 +421,47 @@
font-size: 24rpx; font-size: 24rpx;
} }
} }
.pooup-get-coupon{
position: fixed;
top:0;right:0;
bottom:0;left:0;
background-color: rgba(0,0,0,.5);
display: flex;
align-items: center;
justify-content: center;
z-index:100;
.coupon-box{
width:500rpx;height:620rpx;
border-radius:20rpx;
text-align: center;
position: relative;
top:-120rpx;
image{
position: absolute;
top:0;left:0;
width:100%;height:100%;
z-index:-11;
}
.title{
width:100%;
position: absolute;
bottom:180rpx;left:0;
font-size: 32rpx;
}
.coupon-btn{
width:360rpx;height:80rpx;
line-height:80rpx;
position: absolute;
bottom:64rpx;left:50%;
margin-left:-170rpx;
border-radius:50rpx;
font-size: 36rpx;
font-weight: bold;
background: linear-gradient(0deg, #F72B43, #F15C43);
color:#fff;
}
}
}
} }
</style> </style>
<template> <template>
<view class="appCotent">
<!-- 我的订单 --> <!-- 我的订单 -->
<view class="get-coupon"> <view class="get-coupon">
<view class="box"> <view class="box">
<view class="title">订单信息请前往京东查看</view> <image src="../../../static/index/coupon1.png"></image>
<image src="../../../static/index/box.png"></image> <view class="title">
<view style="margin-bottom:20rpx;">
领取优惠券
</view>
<view>
免费购买京东挪车牌
</view>
</view>
<view class="btn" @click="getCoupon"> <view class="btn" @click="getCoupon">
点击领取优惠券 点击领取优惠券
</view> </view>
</view> </view>
<!-- 领取成功后弹框 -->
<view class="pooup-success" v-if="pooupSuccess">
<view class="success-box">
<image src="../../../static/index/coupon2.png"></image>
<view class="title">
<view style="margin-bottom:10rpx;font-weight: bold;">
优惠券领取成功
</view>
<view class="">
正在跳转中......({{timerNum}}秒)
</view>
</view>
<view class="success-btn" @click="goUseCoupon">
去使用
</view>
</view>
</view>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { export default {
data(){ data(){
return{ return{
pooupSuccess:false,
timerNum:3
} }
}, },
methods:{ methods:{
getCoupon(){ getCoupon(){
let opts = { url: '/app/user/send/coupon', method: 'post' }; // let opts = { url: '/app/user/send/coupon', method: 'post' };
this.http.httpTokenRequest(opts, {}).then(res => { // this.http.httpTokenRequest(opts, {}).then(res => {
console.log(res.data,1111111) // console.log(res.data,1111111)
if(res.data.code == 200){ // if(res.data.code == 200){
uni.showToast({ // uni.showToast({
title: "领取成功!", // title: "领取成功!",
icon: 'none', // icon: 'none',
}); // });
// }
// })
this.pooupSuccess = true
let timer = setInterval(()=>{
if(this.timerNum > 0){
this.timerNum --
}else{
this.pooupSuccess = false
this.timerNum = 3
clearInterval(timer)
} }
}) },1000)
console.log("已领取优惠券111111")
},
goUseCoupon(){
console.log("去使用优惠券222222")
} }
} }
} }
...@@ -44,26 +86,80 @@ ...@@ -44,26 +86,80 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.box{ .box{
width:584rpx;height:664rpx;
position: relative; position: relative;
top:-120rpx; top:-120rpx;
text-align: center; text-align: center;
.title{ .title{
font-size:36rpx; width:100%;
font-size:40rpx;
font-weight: bold; font-weight: bold;
position: absolute;
top:80rpx;left:0;
z-index:10;
color: #9A4315;
} }
image{ image{
width:400rpx;height:300rpx; width:100%;height:100%;
margin-top:80rpx; position: absolute;
top:0;left:0;
} }
.btn{ .btn{
width:660rpx; width:400rpx;
line-height:80rpx; line-height:80rpx;
margin:50rpx auto 0; position: absolute;
bottom:80rpx;left:50%;
margin-left: -190rpx;
z-index:10;
text-align: center; text-align: center;
color:#fff; color:#853116;
font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
border-radius:50rpx; border-radius:50rpx;
background: linear-gradient(to right, #E2241B , #E14A1B); background: linear-gradient(180deg, #FFE0B2, #FFCB78);
box-shadow: 0 6rpx 13rpx 1 rgba(175, 10, 17, 0.17), -3rpx -4rpx 7rpx 0 rgba(173, 28, 14, 0.35);
}
}
.pooup-success{
position: fixed;
top:0;right:0;
bottom:0;left:0;
background-color: rgba(0,0,0,.5);
display: flex;
align-items: center;
justify-content: center;
z-index:100;
.success-box{
width:580rpx;height:700rpx;
border-radius:20rpx;
text-align: center;
position: relative;
top:-120rpx;
image{
position: absolute;
top:0;left:0;
width:100%;height:100%;
z-index:-11;
}
.title{
width:100%;
color: #fff;
position: absolute;
bottom:220rpx;left:0;
font-size: 32rpx;
}
.success-btn{
width:360rpx;height:80rpx;
line-height:80rpx;
position: absolute;
bottom:64rpx;left:50%;
margin-left:-170rpx;
border-radius:50rpx;
font-size: 36rpx;
background: linear-gradient(0deg, #F3AA37, #F37A37);
color:#fff;
}
} }
} }
} }
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
// uni.navigateTo({ // uni.navigateTo({
// url: '/pagesB/pages/move-car/addCar' // url: '/pagesB/pages/move-car/addCar'
// }) // })
let url = "car.m.jd.com/h5/list.html?source=managerprocedure" let url = "car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure"
util.redirectToH5({page:url}) util.redirectToH5({page:url})
}, },
editCar(id) { editCar(id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment