Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
schedule
Commits
db4f0d0c
Commit
db4f0d0c
authored
Apr 23, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加bind第三方账号图片和load效果
parent
a87368f5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
10 deletions
+49
-10
bindFail.png
assests/bindFail.png
+0
-0
bindLoading.gif
assests/bindLoading.gif
+0
-0
bindSuccess.png
assests/bindSuccess.png
+0
-0
appDetails.acss
pages/appDetails/appDetails.acss
+12
-2
appDetails.axml
pages/appDetails/appDetails.axml
+19
-3
appDetails.js
pages/appDetails/appDetails.js
+18
-5
No files found.
assests/bindFail.png
0 → 100644
View file @
db4f0d0c
731 Bytes
assests/bindLoading.gif
0 → 100644
View file @
db4f0d0c
16.5 KB
assests/bindSuccess.png
0 → 100644
View file @
db4f0d0c
1.02 KB
pages/appDetails/appDetails.acss
View file @
db4f0d0c
...
@@ -63,10 +63,19 @@
...
@@ -63,10 +63,19 @@
justify-content: center;
justify-content: center;
}
}
.loadingToast
view {
.loadingToast
>
view {
font-size: 28rpx;
font-size: 28rpx;
color: #FFFFFF;
color: #FFFFFF;
padding: 18rpx 26rpx;
padding: 18rpx 26rpx;
border-radius: 40rpx;
border-radius: 40rpx;
background: rgba(0, 0, 0, .59)
background: rgba(0, 0, 0, .59);
display: flex;
justify-content: center;
align-items: center;
}
.loadingToast image {
width: 36rpx;
height: 36rpx;
margin-right: 8rpx;
}
}
\ No newline at end of file
pages/appDetails/appDetails.axml
View file @
db4f0d0c
...
@@ -29,13 +29,28 @@
...
@@ -29,13 +29,28 @@
{{name ? name : 'outlook'}}
{{name ? name : 'outlook'}}
</view>
</view>
</view>
</view>
<view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}"
onTap="{{isBind ? 'showPopup' : 'bindApp'}}">
<view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}" onTap="{{isBind ? 'showPopup' : 'bindApp'}}">
<text>{{isBind ? '解绑' : '绑定'}}</text>
<text>{{isBind ? '解绑' : '绑定'}}</text>
</view>
</view>
</view>
</view>
<view class="loadingToast" a:if="{{isLoading}}">
<view class="loadingToast" a:if="{{isLoading}}">
<view>
<view a:if="{{bindStatus==='loading'}}">
账号关联中···
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindLoading.gif"/>
<view>
账号关联中···
</view>
</view>
<view a:elif="{{bindStatus==='success'}}">
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindSuccess.png"/>
<view>
关联成功
</view>
</view>
<view a:else>
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindFail.png"/>
<view>
关联失败
</view>
</view>
</view>
</view>
</view>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
pages/appDetails/appDetails.js
View file @
db4f0d0c
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
import
"dingtalk-jsapi/entry/mobile"
;
import
"dingtalk-jsapi/entry/mobile"
;
import
openLink
from
"dingtalk-jsapi/api/biz/util/openLink"
;
import
openLink
from
"dingtalk-jsapi/api/biz/util/openLink"
;
import
create
from
"dd-store"
;
import
create
from
"dd-store"
;
import
{
fail
}
from
"assert"
;
let
interval
=
""
;
let
interval
=
""
;
let
requestNum
=
0
;
let
requestNum
=
0
;
create
.
Page
({
create
.
Page
({
...
@@ -18,7 +19,8 @@ create.Page({
...
@@ -18,7 +19,8 @@ create.Page({
isBind
:
false
,
isBind
:
false
,
isLoading
:
false
,
isLoading
:
false
,
showSelectPopup
:
false
,
showSelectPopup
:
false
,
selectPopupList
:
[{
text
:
"取消关联"
}]
selectPopupList
:
[{
text
:
"取消关联"
}],
bindStatus
:
"loading"
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
setData
({
this
.
setData
({
...
@@ -31,12 +33,17 @@ create.Page({
...
@@ -31,12 +33,17 @@ create.Page({
sendRequest
()
{
sendRequest
()
{
let
that
=
this
;
let
that
=
this
;
interval
=
setInterval
(()
=>
{
interval
=
setInterval
(()
=>
{
if
(
requestNum
>=
30
0
)
{
if
(
requestNum
>=
18
0
)
{
requestNum
=
0
;
requestNum
=
0
;
that
.
setData
({
that
.
setData
({
isBind
:
false
,
isBind
:
false
,
isLoading
:
false
bindStatus
:
"fail"
});
});
setTimeout
(()
=>
{
that
.
setData
({
isLoading
:
false
});
},
2000
);
clearInterval
(
interval
);
clearInterval
(
interval
);
}
}
requestNum
++
;
requestNum
++
;
...
@@ -47,8 +54,13 @@ create.Page({
...
@@ -47,8 +54,13 @@ create.Page({
this
.
setData
({
this
.
setData
({
name
:
item
.
userName
,
name
:
item
.
userName
,
isBind
:
true
,
isBind
:
true
,
isLoading
:
false
bindStatus
:
"success"
});
});
setTimeout
(()
=>
{
that
.
setData
({
isLoading
:
false
});
},
2000
);
clearInterval
(
interval
);
clearInterval
(
interval
);
this
.
$store
.
data
.
relatedAppNeedUpdate
=
true
;
this
.
$store
.
data
.
relatedAppNeedUpdate
=
true
;
this
.
update
();
this
.
update
();
...
@@ -62,7 +74,8 @@ create.Page({
...
@@ -62,7 +74,8 @@ create.Page({
return
false
;
return
false
;
}
}
this
.
setData
({
this
.
setData
({
isLoading
:
true
isLoading
:
true
,
bindStatus
:
"loading"
});
});
this
.
sendRequest
();
this
.
sendRequest
();
if
(
this
.
data
.
platform
===
"outlook"
)
{
if
(
this
.
data
.
platform
===
"outlook"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment