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 79ffffe3
authored
Nov 03, 2022
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feat_v3.0' into 'zhangxw_dev_3.0'
Feat v3.0 See merge request
!136
2 parents
276e7a33
73d0d5bb
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
94 additions
and
93 deletions
components/Tab/Tab.wxss
pages/authentication/register/register.js
pages/checkProduct/checkProduct.scss
pages/tab/discovery/components/product/product.js
pages/tab/discovery/components/product/product.scss
pages/tab/discovery/components/product/product.wxml
pages/tab/discovery/discovery.scss
pages/tab/discovery/discovery.wxml
utils/share.js
components/Tab/Tab.wxss
View file @
79ffffe
...
...
@@ -4,7 +4,7 @@
.tab-box {
display: flex;
width: 100%;
height:
46
px;
height:
92r
px;
box-sizing: border-box;
border-bottom: 1rpx solid #EAEBEF;
}
...
...
pages/authentication/register/register.js
View file @
79ffffe
...
...
@@ -59,13 +59,53 @@ Page({
detail
})
{
if
(
!
detail
.
code
)
return
let
params
=
{
detail
,
...
this
.
data
.
linkParams
let
autoParam
=
{...
detail
}
delete
autoParam
.
code
delete
autoParam
.
cloudID
wx
.
showLoading
()
USERAPI
.
authUserPhone
(
autoParam
,
this
.
loginToken
).
then
(({
code
,
data
,
message
,
errId
})
=>
{
if
(
code
==
'0'
||
errId
==
'30990103'
){
let
{
loginUserInfoList
}
=
data
let
target
=
null
if
(
code
==
'0'
&&
loginUserInfoList
?.
length
){
target
=
loginUserInfoList
.
find
(
item
=>
item
.
merchantId
==
this
.
data
.
linkParams
.
merchantId
)
}
if
(
target
&&
target
.
staffLabel
){
this
.
register
(
detail
)
}
else
{
this
.
isTypeEmpty
(
detail
)
}
}
else
if
(
errId
==
'200122'
){
wx
.
hideLoading
()
this
.
init
(
2
)
}
else
{
wx
.
hideLoading
()
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
}
}).
catch
(({
errMsg
})
=>
{
wx
.
hideLoading
()
wx
.
$api
.
showToast
(
errMsg
||
'系统异常'
)
})
},
isTypeEmpty
(
detail
){
if
(
this
.
data
.
linkParams
.
type
==
1
){
wx
.
$router
.
go
(
'/pages/authentication/registerInfo/registerInfo'
,
params
)
wx
.
hideLoading
()
wx
.
$router
.
go
(
'/pages/authentication/registerInfo/registerInfo'
,{
detail
,
...
this
.
data
.
linkParams
})
}
else
{
this
.
register
(
detail
)
}
},
register
(
detail
){
let
randomName
=
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
(
1
)
*
10000
)
let
{
merchantFileRequest
,
merchantId
}
=
this
.
data
.
linkParams
let
regParmas
=
{
...
...
@@ -78,22 +118,27 @@ Page({
weChatNickName
:
merchantFileRequest
.
fileName
,
weChatAvatarUrl
:
merchantFileRequest
.
fileUrl
}
this
.
register
(
regParmas
,
detail
)
}
},
register
(
params
,
detail
){
USERAPI
.
register
(
params
).
then
((
res
)
=>
{
wx
.
showLoading
()
USERAPI
.
register
(
regParmas
).
then
((
res
)
=>
{
console
.
log
(
res
,
'errId'
)
if
(
res
.
code
==
'0'
){
this
.
toLogin
(
detail
)
}
else
if
(
res
.
errId
==
'200122'
){
wx
.
hideLoading
()
this
.
init
(
2
)
}
else
{
wx
.
hideLoading
()
wx
.
$api
.
showToast
(
res
.
message
||
'系统异常'
)
}
}).
catch
(({
errMsg
})
=>
{
wx
.
hideLoading
()
wx
.
$api
.
showToast
(
errMsg
||
'系统异常'
)
})
},
toLogin
(
detail
){
wx
.
showLoading
()
USERAPI
.
authUserPhone
(
detail
,
this
.
loginToken
).
then
(({
code
,
data
,
...
...
@@ -103,14 +148,16 @@ Page({
if
(
code
==
'0'
){
this
.
checkLoginUserInfo
(
data
)
}
else
if
(
errId
==
'200122'
){
wx
.
hideLoading
()
this
.
init
(
1
)
}
else
{
wx
.
hideLoading
()
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
}
}).
catch
(({
errMsg
})
=>
{
this
.
setShowLoading
(
false
)
wx
.
hideLoading
(
)
wx
.
$api
.
showToast
(
'系统异常'
)
})
},
...
...
pages/checkProduct/checkProduct.scss
View file @
79ffffe
...
...
@@ -79,7 +79,7 @@ page{
bottom
:
0
;
width
:
100%
;
background
:
#ffffff
;
border-radius
:
8px
8
px
0
0
;
border-radius
:
16rpx
16r
px
0
0
;
z-index
:
5
;
.top
{
display
:
flex
;
...
...
@@ -88,9 +88,9 @@ page{
height
:
130rpx
;
.img
{
display
:
block
;
margin
:
0
auto
8
px
;
width
:
40
px
;
height
:
40
px
;
margin
:
0
auto
16r
px
;
width
:
80r
px
;
height
:
80r
px
;
}
// .name {
// font-size: 12px;
...
...
@@ -124,12 +124,12 @@ page{
}
}
.btom
{
margin
:
18
px
auto
0
;
width
:
343
px
;
height
:
44
px
;
line-height
:
44
px
;
margin
:
36r
px
auto
0
;
width
:
686r
px
;
height
:
88r
px
;
line-height
:
88r
px
;
border
:
1px
solid
#eeeeee
;
border-radius
:
4
px
;
border-radius
:
8r
px
;
text-align
:
center
;
}
}
\ No newline at end of file
pages/tab/discovery/components/product/product.js
View file @
79ffffe
...
...
@@ -21,7 +21,6 @@ Component({
navList
:[
'数字无忧权益卡'
],
activeNavIdx
:
0
,
//特色产品
tab
:[
'适用场景'
,
'营销链路'
,
'项目亮点'
,
'转化漏斗'
,
'合作流程'
,
'合作案例'
],
heightArr
:[],
curTabIdx
:
0
,
//适用产品
actNum
:
0
,
//场景
showAuth
:
false
,
...
...
@@ -29,10 +28,9 @@ Component({
},
lifetimes
:{
ready
:
function
(){
this
.
getImgHeight
()
wx
.
$eventbus
.
on
(
'evt_page_scroll'
,
async
(
e
)
=>
{
// console.log(e)
let
heightTop
=
this
.
data
.
headerHeight
// 90 场景高度,8 场景margin-bottom
wx
.
$eventbus
.
on
(
'evt_page_scroll'
,(
e
)
=>
{
wx
.
$util
.
getViewInfo
(
'.header'
,
async
(
res
)
=>
{
let
heightTop
=
this
.
data
.
isShare
?
0
:
(
res
?.
height
||
0
)
let
prodArr
=
await
this
.
getHeight
(
'.prod-wrap'
)
heightTop
+=
prodArr
[
0
].
height
let
imgArr
=
await
this
.
getHeight
(
'.img-item'
)
...
...
@@ -48,6 +46,7 @@ Component({
})
}
})
})
},
},
...
...
@@ -85,18 +84,18 @@ Component({
activeNavIdx
:
this
.
data
.
isShare
?
this
.
data
.
navIdx
:
0
,
tab
})
this
.
getImgHeight
();
},
},
methods
:
{
async
changeTab
(
e
){
changeTab
(
e
){
let
{
idx
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
curTabIdx
:
idx
})
this
.
data
.
throttle
=
true
let
heightTop
=
this
.
data
.
headerHeight
+
90
-
16
-
46
// 90 场景高度,16 可能是误差 , 46 tab高度
wx
.
$util
.
getViewInfo
(
'.header'
,
async
(
res
)
=>
{
let
heightTop
=
this
.
data
.
isShare
?
0
:
(
res
?.
height
||
0
)
let
prodArr
=
await
this
.
getHeight
(
'.prod-wrap'
)
heightTop
+=
prodArr
[
0
].
height
let
imgArr
=
await
this
.
getHeight
(
'.img-item'
)
...
...
@@ -110,6 +109,7 @@ Component({
setTimeout
(()
=>
{
this
.
data
.
throttle
=
false
},
500
)
})
},
getHeight
(
cla
){
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -118,7 +118,6 @@ Component({
resolve
(
rect
)
}).
exec
()
})
},
changeNav
(
event
){
this
.
setData
({
...
...
@@ -168,59 +167,6 @@ Component({
authSuccess
(){
this
.
toDown
()
},
toSetting
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
getSetting
({
success
:
(
res
)
=>
{
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]){
resolve
(
true
)
}
else
{
wx
.
openSetting
({
success
:(
resp
)
=>
{
if
(
resp
.
authSetting
[
'scope.writePhotosAlbum'
]){
resolve
(
true
)
}
else
{
wx
.
showToast
({
title
:
"下载视频前需要您授权'添加到相册'权限"
,
icon
:
"none"
,
duration
:
2500
,
});
}
}
})
}
}
})
})
},
getImgHeight
(){
let
query
=
wx
.
createSelectorQuery
().
in
(
this
)
let
heightArr
=
[]
let
s
=
0
query
.
selectAll
(
'.img-item'
).
boundingClientRect
((
react
)
=>
{
react
.
forEach
(
item
=>
{
s
+=
item
.
height
heightArr
.
push
(
s
)
})
this
.
data
.
heightArr
=
heightArr
}).
exec
()
},
getImgHeight
()
{
let
query
=
wx
.
createSelectorQuery
().
in
(
this
);
let
heightArr
=
[];
let
s
=
0
;
query
.
selectAll
(
".img-item"
)
.
boundingClientRect
((
react
)
=>
{
react
.
forEach
((
item
)
=>
{
s
+=
item
.
height
;
heightArr
.
push
(
s
);
});
this
.
data
.
heightArr
=
heightArr
;
this
.
data
.
allHeight
=
heightArr
[
heightArr
.
length
-
1
];
})
.
exec
();
},
toSharePage
()
{
let
{
actNum
,
activeNavIdx
,
senceData
}
=
this
.
data
;
wx
.
$router
.
go
(
"checkProduct"
,
{
actNum
,
activeNavIdx
,
senceData
,
fromLocal
:
1
});
...
...
pages/tab/discovery/components/product/product.scss
View file @
79ffffe
...
...
@@ -151,6 +151,12 @@
.project-wrap
{
background-color
:
#F5F7FB
;
.sticky-area
{
position
:
sticky
;
position
:
-
webkit-sticky
;
z-index
:
2
;
background-color
:
#F5F7FB
;
}
}
.project-img
{
...
...
@@ -337,7 +343,7 @@
.tab-box
{
display
:
flex
;
width
:
100%
;
height
:
46
px
;
height
:
92r
px
;
box-sizing
:
border-box
;
border-bottom
:
1rpx
solid
#EAEBEF
;
.tab
{
...
...
pages/tab/discovery/components/product/product.wxml
View file @
79ffffe
...
...
@@ -28,7 +28,7 @@
</view>
</view>
<view class="project-wrap">
<view
style="position: sticky;top: {{headerHeight}}px ;z-index: 2;background-color: #F5F7FB;
">
<view
class="sticky-area" style="top: {{headerHeight}}px
">
<!-- <tab openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab> -->
<scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" scroll-left="{{curTabIdx*46}}" class="tab-box" scroll-x enable-flex scroll-with-animation >
<block wx:for="{{tab}}" wx:key="index">
...
...
pages/tab/discovery/discovery.scss
View file @
79ffffe
...
...
@@ -14,7 +14,7 @@ page{
}
.scene-wrap
{
white-space
:
nowrap
;
height
:
90
px
;
height
:
180r
px
;
.scene-img
{
width
:
100%
;
}
...
...
@@ -32,22 +32,24 @@ page{
.chat
,
.applyAct
{
position
:
fixed
;
right
:
0
;
top
:
900rpx
;
width
:
64px
;
height
:
64px
;
top
:
50%
;
transform
:
translateY
(
-50%
);
width
:
128rpx
;
height
:
128rpx
;
border-radius
:
50%
;
z-index
:
3
;
right
:
15rpx
;
}
.
cha
t
{
top
:
750rpx
;
.
applyAc
t
{
top
:
calc
(
50%
+
200rpx
);
}
/* 测算 */
.calculate
{
position
:
fixed
;
right
:
0
;
top
:
1050rpx
;
top
:
calc
(
50%
+
400rpx
);
transform
:
translateY
(
-50%
);
z-index
:
3
;
}
...
...
pages/tab/discovery/discovery.wxml
View file @
79ffffe
...
...
@@ -10,7 +10,7 @@
<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 webp class="scene-img" src="{{IMGURL}}{{item.img}}?v={{img_version}}"></image>
<image
mode="widthFix"
webp class="scene-img" src="{{IMGURL}}{{item.img}}?v={{img_version}}"></image>
</swiper-item>
</block>
</swiper>
...
...
utils/share.js
View file @
79ffffe
...
...
@@ -51,7 +51,7 @@ pageLeaveProxy(page) {
// path += that.setCommonShareQuery()
if
(
shareQuery
)
path
+=
`?
${
shareQuery
}
`
if
(
!
noPageAuth
)
path
=
`/authentication/loading/loading?url=
${
encodeURIComponent
(
path
)}
`
if
(
!
noPageAuth
)
path
=
`/
pages/
authentication/loading/loading?url=
${
encodeURIComponent
(
path
)}
`
if
(
shareFun
)
shareFun
()
if
(
shareTrackData
)
that
.
reportShareData
(
shareTrackData
)
console
.
log
(
'::'
,
path
)
...
...
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