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 3cae8679
authored
Oct 17, 2022
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
吸顶效果
1 parent
fdb1bb4f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
7 deletions
pages/authentication/login/login.js
pages/authentication/login/login.wxml
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.wxml
pages/authentication/login/login.js
View file @
3cae867
const
navStyle
=
"background-color: transparent;"
;
const
navStyle
=
"background-color: transparent;"
;
import
USERAPI
from
'~/api/usersApi/index'
import
USERAPI
from
'~/api/usersApi/index'
import
WxValidate
from
'~/utils/WxValidate'
import
{
import
{
selectAccountLogin
,
selectAccountLogin
,
setLoginInfo
setLoginInfo
...
@@ -18,7 +19,8 @@ Page({
...
@@ -18,7 +19,8 @@ Page({
phone
:
''
,
phone
:
''
,
code
:
''
code
:
''
},
},
authorized
:
false
authorized
:
false
,
phoneReady
:
false
},
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
let
{
...
@@ -33,6 +35,7 @@ Page({
...
@@ -33,6 +35,7 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
validate
=
new
WxValidate
()
},
},
onReady
()
{
onReady
()
{
this
.
init
()
this
.
init
()
...
@@ -154,8 +157,11 @@ Page({
...
@@ -154,8 +157,11 @@ Page({
this
.
setData
({
this
.
setData
({
[
`formData.
${
name
}
`
]
:
value
[
`formData.
${
name
}
`
]
:
value
})
})
let
a
=
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
if
(
this
.
validate
.
methods
.
tel
(
this
.
data
.
formData
.
phone
)){
console
.
log
(
a
)
this
.
setData
({
phoneReady
:
true
})
}
},
},
/**获取验证码 */
/**获取验证码 */
getSmsCode
()
{
getSmsCode
()
{
...
@@ -165,7 +171,7 @@ Page({
...
@@ -165,7 +171,7 @@ Page({
count
count
}
=
this
.
data
,
}
=
this
.
data
,
countDown
=
60
countDown
=
60
if
(
count
)
return
if
(
count
||
!
this
.
data
.
phoneReady
)
return
// this.setData({
// this.setData({
// smsLoading: true
// smsLoading: true
// })
// })
...
...
pages/authentication/login/login.wxml
View file @
3cae867
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<view class="login-btn code">
<view class="login-btn code">
<input maxlength="4" adjust-position="{{false}}" placeholder-class="placeholder" placeholder="请输入验证码"
<input maxlength="4" adjust-position="{{false}}" placeholder-class="placeholder" placeholder="请输入验证码"
bindinput="input" value="{{formData.code}}" data-name="code"/>
bindinput="input" value="{{formData.code}}" data-name="code"/>
<button disabled="{{phoneReady}}" class="code-btn" bindtap="getSmsCode">{{count? count + 's':'获取验证码'}}</button>
<button disabled="{{
!
phoneReady}}" class="code-btn" bindtap="getSmsCode">{{count? count + 's':'获取验证码'}}</button>
</view>
</view>
<view class="login-btn wx-btn" bindtap="handleLogin">登录</view>
<view class="login-btn wx-btn" bindtap="handleLogin">登录</view>
<view class="other">或 <text bindtap="switchLoginMethod" data-type="0">微信登录</text></view>
<view class="other">或 <text bindtap="switchLoginMethod" data-type="0">微信登录</text></view>
...
...
pages/tab/discovery/components/product/product.js
View file @
3cae867
...
@@ -6,6 +6,7 @@ Component({
...
@@ -6,6 +6,7 @@ Component({
* 组件的属性列表
* 组件的属性列表
*/
*/
properties
:
{
properties
:
{
headerHeight
:
Number
},
},
/**
/**
...
...
pages/tab/discovery/components/product/product.scss
View file @
3cae867
...
@@ -146,7 +146,6 @@
...
@@ -146,7 +146,6 @@
}
}
.project-img
{
.project-img
{
height
:
500rpx
;
white-space
:
nowrap
;
white-space
:
nowrap
;
.img-item
{
.img-item
{
height
:
300rpx
;
height
:
300rpx
;
...
...
pages/tab/discovery/components/product/product.wxml
View file @
3cae867
...
@@ -35,7 +35,9 @@
...
@@ -35,7 +35,9 @@
</view>
</view>
</view>
</view>
<view class="project-wrap">
<view class="project-wrap">
<view style="position: sticky;top: {{headerHeight}}px ;z-index: 1;">
<tab openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab>
<tab openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab>
</view>
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
<block wx:for="{{tab}}" wx:key="index">
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item">
<view id="to-{{index}}" class="img-item">
...
...
pages/tab/discovery/discovery.wxml
View file @
3cae867
...
@@ -5,6 +5,6 @@
...
@@ -5,6 +5,6 @@
</navigation-bar>
</navigation-bar>
<view style="padding-top: {{headerHeight}}px;">
<view style="padding-top: {{headerHeight}}px;">
<product></product>
<product
headerHeight="{{headerHeight}}"
></product>
</view>
</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
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