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 90c689d7
authored
Oct 25, 2022
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.0' into 'zhangxw_dev_3.0'
V3.0 See merge request
!73
2 parents
68708f24
6f67ee46
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
61 additions
and
12 deletions
components/Tab/Tab.wxss
packageMine/pages/editBasicInfo/index.scss
pages/authentication/login/login.js
pages/authentication/register/register.js
pages/authentication/registerInfo/registerInfo.js
pages/checkProduct/checkProduct.js
pages/tab/discovery/components/product/product.js
pages/tab/discovery/discovery.js
pages/tab/discovery/discovery.scss
pages/tab/discovery/discovery.wxml
components/Tab/Tab.wxss
View file @
90c689d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
.tab-box {
.tab-box {
display: flex;
display: flex;
width: 100%;
width: 100%;
height:
92r
px;
height:
46
px;
box-sizing: border-box;
box-sizing: border-box;
border-bottom: 1rpx solid #EAEBEF;
border-bottom: 1rpx solid #EAEBEF;
}
}
...
...
packageMine/pages/editBasicInfo/index.scss
View file @
90c689d
...
@@ -51,3 +51,11 @@ page {
...
@@ -51,3 +51,11 @@ page {
font-size
:
32rpx
!
important
;
font-size
:
32rpx
!
important
;
color
:
#333333
!
important
;
color
:
#333333
!
important
;
}
}
.van-picker__cancel
{
font-size
:
32rpx
!
important
;
color
:
#999999
!
important
;
}
.van-picker__confirm
{
font-size
:
32rpx
!
important
;
color
:
#556AF5
!
important
;
}
\ No newline at end of file
\ No newline at end of file
pages/authentication/login/login.js
View file @
90c689d
...
@@ -57,7 +57,7 @@ Page({
...
@@ -57,7 +57,7 @@ Page({
errMsg
errMsg
})
{
})
{
console
.
error
(
errMsg
)
console
.
error
(
errMsg
)
this
.
reLogin
()
this
.
reLogin
(
errMsg
)
}
}
},
},
/**获取loginToken */
/**获取loginToken */
...
...
pages/authentication/register/register.js
View file @
90c689d
...
@@ -116,7 +116,7 @@ Page({
...
@@ -116,7 +116,7 @@ Page({
/**多个账号 */
/**多个账号 */
console
.
log
(
loginUserInfoList
,
'loginUserInfoList'
)
console
.
log
(
loginUserInfoList
,
'loginUserInfoList'
)
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
go
(
'/pages/authentication/accountItems/accountItems'
,
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
reLaunch
(
'/pages/authentication/accountItems/accountItems'
,
{
sessionId
,
sessionId
,
...
this
.
options
...
this
.
options
})
})
...
@@ -130,6 +130,8 @@ Page({
...
@@ -130,6 +130,8 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
'sessionId'
)
let
data
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
let
data
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
console
.
log
(
data
)
console
.
log
(
data
)
let
{
staffName
,
fileUrl
,
merchantId
,
type
}
=
data
let
{
staffName
,
fileUrl
,
merchantId
,
type
}
=
data
...
...
pages/authentication/registerInfo/registerInfo.js
View file @
90c689d
...
@@ -59,7 +59,7 @@ Page({
...
@@ -59,7 +59,7 @@ Page({
errMsg
errMsg
})
{
})
{
console
.
error
(
errMsg
)
console
.
error
(
errMsg
)
this
.
reLogin
()
this
.
reLogin
(
errMsg
)
}
}
},
},
/**获取loginToken */
/**获取loginToken */
...
@@ -144,7 +144,7 @@ Page({
...
@@ -144,7 +144,7 @@ Page({
})
{
})
{
/**多个账号 */
/**多个账号 */
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
go
(
'/pages/authentication/accountItems/accountItems'
,
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
reLaunch
(
'/pages/authentication/accountItems/accountItems'
,
{
sessionId
,
sessionId
,
...
this
.
options
...
this
.
options
})
})
...
...
pages/checkProduct/checkProduct.js
View file @
90c689d
...
@@ -48,6 +48,7 @@ Page({
...
@@ -48,6 +48,7 @@ Page({
this
.
setData
({
this
.
setData
({
navStyle
:
scrollTop
==
0
?
navStyle
:
`background-color:
${
color
}
;`
navStyle
:
scrollTop
==
0
?
navStyle
:
`background-color:
${
color
}
;`
})
})
wx
.
$eventbus
.
emit
(
'evt_page_scroll'
,{
scrollTop
})
},
},
// 分享按钮
// 分享按钮
sharehandle
()
{
sharehandle
()
{
...
...
pages/tab/discovery/components/product/product.js
View file @
90c689d
...
@@ -27,6 +27,24 @@ Component({
...
@@ -27,6 +27,24 @@ Component({
lifetimes
:{
lifetimes
:{
ready
:
function
(){
ready
:
function
(){
this
.
getImgHeight
()
this
.
getImgHeight
()
wx
.
$eventbus
.
on
(
'evt_page_scroll'
,
async
(
e
)
=>
{
// console.log(e)
let
heightTop
=
this
.
data
.
headerHeight
// 90 场景高度,8 场景margin-bottom
let
prodArr
=
await
this
.
getHeight
(
'.prod-wrap'
)
heightTop
+=
prodArr
[
0
].
height
let
imgArr
=
await
this
.
getHeight
(
'.img-item'
)
let
imgHeightArr
=
[]
imgArr
.
reduce
((
pre
,
cur
,
index
)
=>
{
imgHeightArr
.
push
(
pre
+
cur
.
height
)
return
pre
+
cur
.
height
},
heightTop
)
let
idx
=
imgHeightArr
.
findIndex
(
item
=>
item
>
e
.
scrollTop
)
if
(
idx
>-
1
){
this
.
setData
({
curTabIdx
:
idx
})
}
})
},
},
},
},
...
@@ -69,11 +87,31 @@ Component({
...
@@ -69,11 +87,31 @@ Component({
},
},
methods
:
{
methods
:
{
changeTab
(
e
){
async
changeTab
(
e
){
let
idx
=
e
.
detail
let
idx
=
e
.
detail
this
.
setData
({
this
.
setData
({
intoViewId
:
`to-
${
idx
}
`
intoViewId
:
`to-
${
idx
}
`
})
})
let
heightTop
=
this
.
data
.
headerHeight
+
90
-
16
-
46
// 90 场景高度,16 可能是误差 , 46 tab高度
let
prodArr
=
await
this
.
getHeight
(
'.prod-wrap'
)
heightTop
+=
prodArr
[
0
].
height
let
imgArr
=
await
this
.
getHeight
(
'.img-item'
)
for
(
let
i
=
0
;
i
<
idx
;
i
++
){
heightTop
+=
imgArr
[
i
].
height
}
wx
.
pageScrollTo
({
scrollTop
:
heightTop
,
duration
:
0
})
},
getHeight
(
cla
){
return
new
Promise
((
resolve
,
reject
)
=>
{
let
query
=
wx
.
createSelectorQuery
().
in
(
this
)
query
.
selectAll
(
cla
).
boundingClientRect
((
rect
)
=>
{
resolve
(
rect
)
}).
exec
()
})
},
},
changeNav
(
event
){
changeNav
(
event
){
this
.
setData
({
this
.
setData
({
...
@@ -88,12 +126,10 @@ Component({
...
@@ -88,12 +126,10 @@ Component({
},
},
downVideo
(
e
)
{
downVideo
(
e
)
{
let
{
url
}
=
e
.
target
.
dataset
let
{
url
}
=
e
.
target
.
dataset
console
.
log
(
url
)
wx
.
$api
.
showToast
(
'正在下载视频...'
)
wx
.
$api
.
showToast
(
'正在下载视频...'
)
wx
.
downloadFile
({
wx
.
downloadFile
({
url
:
url
,
url
:
url
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
,
111
)
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
statusCode
===
200
)
{
wx
.
saveVideoToPhotosAlbum
({
wx
.
saveVideoToPhotosAlbum
({
...
...
pages/tab/discovery/discovery.js
View file @
90c689d
...
@@ -115,6 +115,7 @@ Page({
...
@@ -115,6 +115,7 @@ Page({
this
.
setData
({
this
.
setData
({
navStyle
:
scrollTop
==
0
?
navStyle
:
`background-color:
${
color
}
;`
navStyle
:
scrollTop
==
0
?
navStyle
:
`background-color:
${
color
}
;`
})
})
wx
.
$eventbus
.
emit
(
'evt_page_scroll'
,{
scrollTop
})
},
},
changeSwiper
(
e
){
changeSwiper
(
e
){
...
...
pages/tab/discovery/discovery.scss
View file @
90c689d
...
@@ -4,11 +4,12 @@ page{
...
@@ -4,11 +4,12 @@ page{
}
}
.container
{
.container
{
position
:
relative
;
position
:
relative
;
.header
{
padding-bottom
:
8px
;
}
.scene-wrap
{
.scene-wrap
{
white-space
:
nowrap
;
white-space
:
nowrap
;
height
:
180rpx
;
height
:
90px
;
margin-bottom
:
16rpx
;
.scene-img
{
.scene-img
{
width
:
100%
;
width
:
100%
;
}
}
...
...
pages/tab/discovery/discovery.wxml
View file @
90c689d
...
@@ -66,6 +66,6 @@
...
@@ -66,6 +66,6 @@
</view>
</view>
<!-- 在线客服 -->
<!-- 在线客服 -->
<image
wx:if="{{showPage}}" class="chat" src="{{IMGURL}}customer_service
.png" bindtap="goConsult" />
<image
mode="aspectFit" wx:if="{{showPage}}" class="chat" src="{{IMGURL}}kefu
.png" bindtap="goConsult" />
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