Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f8417a48
authored
Jun 05, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
场景上下架判断
1 parent
b8ffe9ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
16 deletions
packagesList/pages/productDetail/productDetail.js
packagesList/pages/videoDetal/videoDetal.js
packagesList/pages/productDetail/productDetail.js
View file @
f8417a4
...
@@ -78,7 +78,8 @@ Page({
...
@@ -78,7 +78,8 @@ Page({
// let { actNum, activeNavIdx, isShare,sharephone, sceneCode } = options
// let { actNum, activeNavIdx, isShare,sharephone, sceneCode } = options
let
{
isShare
,
sharephone
,
sceneCode
,
id
}
=
options
let
{
isShare
,
sharephone
,
sceneCode
,
id
}
=
options
let
proData
=
await
this
.
getProductDetail
(
id
);
let
proData
=
await
this
.
getProductDetail
(
id
);
if
(
!
proData
)
{
// 1-上架;2-下架
if
(
!
proData
||
proData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
hasProduct
:
false
hasProduct
:
false
})
})
...
@@ -132,21 +133,10 @@ Page({
...
@@ -132,21 +133,10 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
//接受跳转的路由参数(小程序页面跳转)
async onRoute(options) {
async onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
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 { phone=123, id, sceneCode } = options;
let proData = await this.getProductDetail(id);
let proData = await this.getProductDetail(id);
if (!proData) {
// 1-上架;2-下架
if (!proData || proData?.status == 2) {
this.setData({
this.setData({
hasProduct: false
hasProduct: false
})
})
...
...
packagesList/pages/videoDetal/videoDetal.js
View file @
f8417a4
...
@@ -34,7 +34,8 @@ Page({
...
@@ -34,7 +34,8 @@ Page({
if
(
utils
.
isEmptyObj
(
options
))
return
if
(
utils
.
isEmptyObj
(
options
))
return
const
{
id
,
isShare
}
=
options
;
const
{
id
,
isShare
}
=
options
;
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
if
(
!
videoData
)
{
// 1-上架;2-下架
if
(
!
videoData
||
videoData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
hasProduct
:
false
hasProduct
:
false
})
})
...
@@ -53,7 +54,8 @@ Page({
...
@@ -53,7 +54,8 @@ Page({
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
let
{
id
,
sceneCode
}
=
options
;
let
{
id
,
sceneCode
}
=
options
;
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
let
videoData
=
await
this
.
getDetailWithLike
(
id
);
if
(
!
videoData
)
{
// 1-上架;2-下架
if
(
!
videoData
||
videoData
?.
status
==
2
)
{
this
.
setData
({
this
.
setData
({
hasProduct
:
false
hasProduct
:
false
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment