Commit 2264a8e9 authored by lijiongliang's avatar lijiongliang

逻辑修改

parent 048eb84d
......@@ -57,6 +57,7 @@
</template>
<script>
import util from '@/pages/login/util.js'
export default {
data() {
return {
......@@ -179,6 +180,7 @@
if(res.data.length == 0){
let url = "car.m.jd.com/h5/list.html?source=managerprocedure"
util.redirectToH5({page:url})
uni.setStorageSync('firstCoupon',true)
}else{
// uni.navigateTo({
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
......
......@@ -12,6 +12,7 @@
</view>
</template>
<script src="https://gias.jd.com/js/td.js"></script>
<script>
import {
mapState
......@@ -50,6 +51,20 @@
if (this.tab == 'personal') {
this.$refs.personal.getUserInfo();
}
// 领券判断
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){
uni.removeStorageSync('firstCoupon')
uni.showToast({
title: "领取成功!",
icon: 'none',
});
}
})
}
},
onReachBottom() {
let refresh = uni.getStorageSync("refresh")
......
......@@ -32,7 +32,6 @@
});
}
})
}
}
}
......
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