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