Commit f8417a48 by chenwq

场景上下架判断

1 parent b8ffe9ca
......@@ -78,7 +78,8 @@ Page({
// let { actNum, activeNavIdx, isShare,sharephone, sceneCode } = options
let { isShare,sharephone, sceneCode, id } = options
let proData = await this.getProductDetail(id);
if (!proData) {
// 1-上架;2-下架
if (!proData || proData?.status == 2) {
this.setData({
hasProduct: false
})
......@@ -132,21 +133,10 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
async onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
// let { actNum = 0, activeNavIdx = 0,phone=123, sceneid99=0 } = options;
// let data = actNum != 99 ? scenceList : productData[actNum]
// let value = actNum != 99 ? actNum : sceneid99
// let sceneObj = data.find(item => item.sceneid == value)
// let proInfo = sceneObj?.productList.find(item => item.id == activeNavIdx)
// this.setData({
// actNum, //选中的场景下标
// activeNavIdx, //选中的产品
// sharephone:phone //联系电话 (登陆的用户)
// });
let { phone=123, id, sceneCode } = options;
let proData = await this.getProductDetail(id);
if (!proData) {
// 1-上架;2-下架
if (!proData || proData?.status == 2) {
this.setData({
hasProduct: false
})
......
......@@ -34,7 +34,8 @@ Page({
if (utils.isEmptyObj(options)) return
const { id, isShare } = options;
let videoData = await this.getDetailWithLike(id);
if (!videoData) {
// 1-上架;2-下架
if (!videoData || videoData?.status == 2) {
this.setData({
hasProduct: false
})
......@@ -53,7 +54,8 @@ Page({
if (!options || utils.isEmptyObj(options)) return
let { id, sceneCode } = options;
let videoData = await this.getDetailWithLike(id);
if (!videoData) {
// 1-上架;2-下架
if (!videoData || videoData?.status == 2) {
this.setData({
hasProduct: false
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!