Commit 2264a8e9 authored by lijiongliang's avatar lijiongliang

逻辑修改

parent 048eb84d
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
</template> </template>
<script> <script>
import util from '@/pages/login/util.js'
export default { export default {
data() { data() {
return { return {
...@@ -179,6 +180,7 @@ ...@@ -179,6 +180,7 @@
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?source=managerprocedure"
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
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
</view> </view>
</template> </template>
<script src="https://gias.jd.com/js/td.js"></script>
<script> <script>
import { import {
mapState mapState
...@@ -50,6 +51,20 @@ ...@@ -50,6 +51,20 @@
if (this.tab == 'personal') { if (this.tab == 'personal') {
this.$refs.personal.getUserInfo(); 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() { onReachBottom() {
let refresh = uni.getStorageSync("refresh") let refresh = uni.getStorageSync("refresh")
......
...@@ -32,7 +32,6 @@ ...@@ -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