|
|
|
@ -71,11 +71,15 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import couponModel from '../models/coupon-model'; |
|
|
|
import configs from '../configs'; |
|
|
|
|
|
|
|
var strCookie =document.cookie; |
|
|
|
var cookieName = "1hjz_mall_login_access_token="; |
|
|
|
var token = strCookie.slice(cookieName.length); |
|
|
|
// console.log(arr) |
|
|
|
import couponModel from '../models/coupon-model'; |
|
|
|
|
|
|
|
var locationUrl = configs.locationUrl; |
|
|
|
// console.log(arr) |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
@ -86,7 +90,8 @@ |
|
|
|
'1': '定额券', |
|
|
|
'2': '满减券', |
|
|
|
'3': '折扣券', |
|
|
|
} |
|
|
|
}, |
|
|
|
batchNo: this.$route.query.batchNo, |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -97,7 +102,7 @@ |
|
|
|
let that = this; |
|
|
|
|
|
|
|
// 回去优惠券信息 |
|
|
|
couponModel.getCouponInfo('CB180620024554871101',token).then(function (result) { |
|
|
|
couponModel.getCouponInfo(that.batchNo, token).then(function (result) { |
|
|
|
|
|
|
|
console.log(result.response); |
|
|
|
|
|
|
|
@ -123,8 +128,8 @@ |
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
batchNo: 'CB180620024554871101' |
|
|
|
batchNo: that.batchNo |
|
|
|
// batchNo: 'CB180620024554871101' |
|
|
|
// encodeToken: arr |
|
|
|
}; |
|
|
|
|
|
|
|
@ -145,14 +150,14 @@ |
|
|
|
if (result.code === 0 || result.code === 3) { |
|
|
|
alert("领取成功!"); |
|
|
|
setTimeout(function () { |
|
|
|
window.location.href = 'http://192.168.40.160:8808/mall/web/vgoods/detail/' + that.getData.goodsNo; |
|
|
|
window.location.href = locationUrl + '/mall/web/vgoods/detail/' + that.getData.goodsNo; |
|
|
|
}, 2000); |
|
|
|
// window.history.go(0); |
|
|
|
// hide_layer(1); |
|
|
|
} else if (result.code === 666) { |
|
|
|
alert("您还没登录,请先登录!"); |
|
|
|
setTimeout(function () { |
|
|
|
window.location.href = '/mall/web/user/login'; |
|
|
|
window.location.href = locationUrl + '/mall/web/user/login'; |
|
|
|
}, 2000); |
|
|
|
} else { |
|
|
|
if (result.msg === '' || result.msg === undefined || result.msg == null) { |
|
|
|
|