Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-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 0e547e1c
authored
Oct 27, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'zq_dev_3.0' into 'v3.0'
去掉场景无缝衔接 See merge request
!88
2 parents
2fcf31cb
0b4747c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
23 deletions
pages/checkProduct/checkProduct.wxml
pages/tab/discovery/components/product/product.wxml
pages/tab/discovery/discovery.js
pages/tab/discovery/discovery.wxml
pages/checkProduct/checkProduct.wxml
View file @
0e547e1
...
...
@@ -40,6 +40,6 @@
</view>
</view>
<block wx:if="{{showAuth}}">
<authorize scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<authorize
title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?"
scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
</block>
pages/tab/discovery/components/product/product.wxml
View file @
0e547e1
...
...
@@ -59,5 +59,5 @@
</scroll-view>
</view>
<block wx:if="{{showAuth}}">
<authorize scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<authorize
title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?"
scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
</block>
pages/tab/discovery/discovery.js
View file @
0e547e1
...
...
@@ -10,7 +10,7 @@ Page({
data
:
{
senceData
,
headerHeight
:
0
,
actNum
:
3
,
actNum
:
0
,
navStyle
,
// 预估弹框
visible
:
false
,
...
...
@@ -46,14 +46,14 @@ Page({
let
sceneCodeList
=
[]
let
senceData
=
[...
this
.
data
.
senceData
]
// let res = [
//
{
//
sceneCode: 'SC001',
// status: 1
//
},
//
{
//
sceneCode: 'SC002',
//
status: 1
//
},
//
{
//
sceneCode: 'SC001',
// status: 0
//
},
//
{
//
sceneCode: 'SC002',
//
status: 1
//
},
// {
// sceneCode: 'SC003',
// status: 1
...
...
@@ -67,22 +67,17 @@ Page({
if
(
item
.
status
==
1
)
{
let
sceneTarget
=
senceData
.
find
(
sitem
=>
sitem
.
sceneCode
==
item
.
sceneCode
)
sceneTarget
.
show
=
1
}
})
senceData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
show
==
1
)
{
sceneCodeList
.
push
(
item
.
sceneCode
)
}
})
let
idx
=
sceneCodeList
.
findIndex
(
item
=>
item
==
'SC004'
)
// senceData.forEach((item,index) => {
// if(item.show==1) {
// sceneCodeList.push(item.sceneCode)
// }
// })
let
actNum
=
0
,
currentId
=
0
;
if
(
sceneCodeList
?.
length
){
if
(
idx
>-
1
){
actNum
=
3
currentId
=
idx
}
else
{
actNum
=
senceData
.
findIndex
(
item
=>
item
.
sceneCode
==
sceneCodeList
[
0
])
}
actNum
=
senceData
.
findIndex
(
item
=>
item
.
sceneCode
==
sceneCodeList
[
0
])
}
this
.
setData
({
sceneCodeList
,
...
...
pages/tab/discovery/discovery.wxml
View file @
0e547e1
...
...
@@ -7,7 +7,7 @@
<block wx:if="{{sceneCodeList.length>0 && showPage}}">
<view style="padding-top: {{headerHeight}}px;">
<view class="header">
<swiper bindchange="changeSwiper" current="{{currentId}}" class="scene-wrap"
circular="{{true}}"
previousMargin="40rpx" nextMargin="40rpx">
<swiper bindchange="changeSwiper" current="{{currentId}}" class="scene-wrap" previousMargin="40rpx" nextMargin="40rpx">
<block wx:for="{{senceData}}" wx:key="index">
<swiper-item item-id="{{index}}" wx:if="{{item.show}}">
<image class="scene-img" src="{{IMGURL}}{{item.img}}"></image>
...
...
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