feat: 增加状态

This commit is contained in:
zhangds 2024-05-15 10:52:41 +08:00
parent 9e77351dfb
commit 2cd0d16304
2 changed files with 13 additions and 0 deletions

View File

@ -244,6 +244,7 @@
let wxauth_url = "https://openapi.1688sup.com/wechat/oauth";
let pageV2 = await this.isPageV2(data, type); // 新页面,无须授权
debugger
if (pageV2) {
wxauth_url = "/goods-v2/ysf-reduce.html";
} else {

View File

@ -143,6 +143,7 @@
let openid = getQueryString("openid");
if (openid) {
this.openid = openid;
this.getGoodsStatus();
}
},
mounted() {
@ -150,6 +151,17 @@
},
methods: {
// 获取最新的商品状态
getGoodsStatus() {
if (this.goodsInfo.entity.goods_id) {
let params = {
token: localStorage.getItem("token")
}
req.axiosGet(`/key/order/orderCashInfoByGoodsId/${this.goodsInfo.entity.goods_id}`, params).then(res => {
console.log("状态 =>", res)
})
}
},
/* 立即领取 */
receive() {
if (this.loading) return;