Commit ca9b2b6e authored by lijiongliang's avatar lijiongliang

逻辑修改

parent d21ca06c
const baseUrl = 'https://jduniapp.uzosp.com//test-api'; const baseUrl = 'https://r.ucaret.cn/test-api';
// const baseUrl = 'http://nrucci.natappfree.cc'; // const baseUrl = 'http://nrucci.natappfree.cc';
const httpRequest = (opts, data) => { const httpRequest = (opts, data) => {
let httpDefaultOpts = { let httpDefaultOpts = {
......
...@@ -140,6 +140,16 @@ ...@@ -140,6 +140,16 @@
}else{ }else{
this.pooupCoupon = false this.pooupCoupon = false
this.timerNum = 3 this.timerNum = 3
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数
},
success(res) {
// 打开成功
}
})
clearInterval(timer) clearInterval(timer)
} }
},1000) },1000)
...@@ -158,8 +168,17 @@ ...@@ -158,8 +168,17 @@
}, },
// 已领取优惠券按钮 // 已领取优惠券按钮
goBuy(){ goBuy(){
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数
},
success(res) {
// 打开成功
this.pooupCoupon = false this.pooupCoupon = false
console.log("去购买11111") }
})
}, },
getMoveCode() { getMoveCode() {
let opts = { let opts = {
...@@ -216,9 +235,9 @@ ...@@ -216,9 +235,9 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/transitionPage' url: '/pages/transitionPage'
}); });
uni.setStorageSync('firstCoupon',true)
// let url = "car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure" // 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)
}else{ }else{
// uni.navigateTo({ // uni.navigateTo({
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id // url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
......
...@@ -27,7 +27,7 @@ export let config = { ...@@ -27,7 +27,7 @@ export let config = {
// 微信快捷登录按钮样式 // 微信快捷登录按钮样式
userPlaceholder: '', userPlaceholder: '',
// 帐密登录的 placeholder // 帐密登录的 placeholder
loginBtnStyle: 'color:red', loginBtnStyle: 'color:#fff',
// 帐密登录界面登录按钮样式 // 帐密登录界面登录按钮样式
tabStyle: 'color:green', tabStyle: 'color:green',
//帐密和手机号登录tab样式 //帐密和手机号登录tab样式
......
...@@ -54,16 +54,29 @@ ...@@ -54,16 +54,29 @@
// 领券判断 // 领券判断
let firstCoupon= uni.getStorageSync('firstCoupon') || false let firstCoupon= uni.getStorageSync('firstCoupon') || false
if(firstCoupon){ if(firstCoupon){
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 => {
if(res.data.code == 200){ // if(res.data.code == 200){
// }
// })
uni.removeStorageSync('firstCoupon') uni.removeStorageSync('firstCoupon')
uni.showToast({ uni.showToast({
title: "领取成功!", title: "领取成功!",
icon: 'none', icon: 'none',
}); });
setTimeout(()=>{
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数
},
success(res) {
// 打开成功
} }
}) })
},600)
} }
}, },
onReachBottom() { onReachBottom() {
......
...@@ -10,9 +10,8 @@ ...@@ -10,9 +10,8 @@
} }
}, },
onLoad(){ onLoad(){
let url = "car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure" let url = "https://car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure"
util.redirectToH5({page:url}) util.redirectToH5({page:url})
uni.setStorageSync('firstCoupon',true)
} }
} }
</script> </script>
......
<template> <template>
<view class="appCotent"> <view class="appCotent">
<!-- 我的订单 --> <!-- 我的订单 -->
<view class="get-coupon"> <view class="get-coupon">
<view class="box"> <view class="box">
...@@ -37,130 +37,198 @@ ...@@ -37,130 +37,198 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
pooupSuccess:false, pooupSuccess: false,
timerNum:3 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
// uni.navigateToMiniProgram({
// appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
// path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
// extraData: { // 需要携带的参数
// },
// success(res) {
// // 打开成功
// } // }
// }) // })
// clearInterval(timer)
// }
// }, 1000)
// }
// })
// uni.showToast({
// title: "领取成功!",
// icon: 'none',
// });
this.pooupSuccess = true this.pooupSuccess = true
let timer = setInterval(()=>{ let timer = setInterval(() => {
if(this.timerNum > 0){ if (this.timerNum > 0) {
this.timerNum -- this.timerNum--
}else{ } else {
this.pooupSuccess = false this.pooupSuccess = false
this.timerNum = 3 this.timerNum = 3
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数
},
success(res) {
// 打开成功
}
})
clearInterval(timer) clearInterval(timer)
} }
},1000) }, 1000)
console.log("已领取优惠券111111") },
goUseCoupon() {
uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数
}, },
goUseCoupon(){ success(res) {
console.log("去使用优惠券222222") // 打开成功
this.pooupSuccess = false
}
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.get-coupon{ .get-coupon {
width:100%;height:100vh; width: 100%;
height: 100vh;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.box{
width:584rpx;height:664rpx; .box {
width: 584rpx;
height: 664rpx;
position: relative; position: relative;
top:-120rpx; top: -120rpx;
text-align: center; text-align: center;
.title{
width:100%; .title {
font-size:40rpx; width: 100%;
font-size: 40rpx;
font-weight: bold; font-weight: bold;
position: absolute; position: absolute;
top:80rpx;left:0; top: 80rpx;
z-index:10; left: 0;
z-index: 10;
color: #9A4315; color: #9A4315;
} }
image{
width:100%;height:100%; image {
width: 100%;
height: 100%;
position: absolute; position: absolute;
top:0;left:0; top: 0;
left: 0;
} }
.btn{
width:400rpx; .btn {
line-height:80rpx; width: 400rpx;
line-height: 80rpx;
position: absolute; position: absolute;
bottom:80rpx;left:50%; bottom: 80rpx;
left: 50%;
margin-left: -190rpx; margin-left: -190rpx;
z-index:10; z-index: 10;
text-align: center; text-align: center;
color:#853116; color: #853116;
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
border-radius:50rpx; border-radius: 50rpx;
background: linear-gradient(180deg, #FFE0B2, #FFCB78); 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); box-shadow: 0 6rpx 13rpx 1 rgba(175, 10, 17, 0.17), -3rpx -4rpx 7rpx 0 rgba(173, 28, 14, 0.35);
} }
} }
.pooup-success{ .pooup-success {
position: fixed; position: fixed;
top:0;right:0; top: 0;
bottom:0;left:0; right: 0;
background-color: rgba(0,0,0,.5); bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, .5);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index:100; z-index: 100;
.success-box{
width:580rpx;height:700rpx; .success-box {
border-radius:20rpx; width: 580rpx;
height: 700rpx;
border-radius: 20rpx;
text-align: center; text-align: center;
position: relative; position: relative;
top:-120rpx; top: -120rpx;
image{
image {
position: absolute; position: absolute;
top:0;left:0; top: 0;
width:100%;height:100%; left: 0;
z-index:-11; width: 100%;
height: 100%;
z-index: -11;
} }
.title{
width:100%; .title {
width: 100%;
color: #fff; color: #fff;
position: absolute; position: absolute;
bottom:220rpx;left:0; bottom: 220rpx;
left: 0;
font-size: 32rpx; font-size: 32rpx;
} }
.success-btn{
width:360rpx;height:80rpx; .success-btn {
line-height:80rpx; width: 360rpx;
height: 80rpx;
line-height: 80rpx;
position: absolute; position: absolute;
bottom:64rpx;left:50%; bottom: 64rpx;
margin-left:-170rpx; left: 50%;
border-radius:50rpx; margin-left: -170rpx;
border-radius: 50rpx;
font-size: 36rpx; font-size: 36rpx;
background: linear-gradient(0deg, #F3AA37, #F37A37); background: linear-gradient(0deg, #F3AA37, #F37A37);
color:#fff; color: #fff;
}
} }
} }
} }
}
</style> </style>
...@@ -69,8 +69,9 @@ export default { ...@@ -69,8 +69,9 @@ 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?final-action=closewebview&source=licenseprocedure" uni.navigateTo({
util.redirectToH5({page:url}) url: '/pages/transitionPage'
});
}, },
editCar(id) { editCar(id) {
uni.navigateTo({ uni.navigateTo({
......
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