Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
df2b8338
Commit
df2b8338
authored
Mar 16, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
a0d96920
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
22 deletions
+38
-22
index.vue
pages/coffee/index.vue
+37
-21
index.vue
pages/index/index.vue
+1
-1
No files found.
pages/coffee/index.vue
View file @
df2b8338
...
...
@@ -76,8 +76,8 @@
<u-popup
v-model=
"isShowQrcode"
mode=
"center"
@
close=
"closeQrcode"
>
<view
class=
"qrcodeBox"
>
<Qrcode
ref=
"qrcode"
:modal=
"modal_qr"
:url=
"qrData"
@
hideQrcode=
"hideQrcode"
themeColor=
"#000000"
is_themeImg
:themeImg=
"headImg"
/>
<Qrcode
ref=
"qrcode"
:modal=
"modal_qr"
:url=
"qrData"
@
hideQrcode=
"hideQrcode"
themeColor=
"#000000"
is_themeImg
:themeImg=
"headImg"
/>
</view>
</u-popup>
<u-popup
v-model=
"isShowSuccess"
:maskCloseAble=
"false"
mode=
"center"
@
close=
"closePopup"
>
...
...
@@ -97,14 +97,17 @@
</view>
</view>
</u-popup>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
Qrcode
from
"./qrcode/ay-qrcode.vue"
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
Qrcode
,
auth
},
data
()
{
return
{
...
...
@@ -116,15 +119,19 @@
isShowQrcode
:
false
,
headImg
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup.png"
,
pageData
:
{
GiveAwayList
:[]
GiveAwayList
:
[]
},
isShowSuccess
:
false
,
timer
:
null
,
flag
:
false
,
//是否继续请求扫码结果
flag
:
false
,
//是否继续请求扫码结果
showAuth
:
false
,
}
},
onLoad
()
{
if
(
!
uni
.
getStorageSync
(
"mall_UserInfo"
))
{
this
.
showAuth
=
true
;
}
this
.
statusNavBar
=
uni
.
getSystemInfoSync
().
statusBarHeight
let
userInfo
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
if
(
userInfo
.
Photo
)
{
...
...
@@ -133,15 +140,15 @@
this
.
UserId
=
userInfo
.
UserId
this
.
getData
()
},
onHide
(){
this
.
flag
=
false
onHide
()
{
this
.
flag
=
false
},
methods
:
{
getGive
(){
let
res
=
{}
for
(
let
i
=
0
;
i
<
this
.
pageData
.
GiveAwayList
.
length
;
i
++
)
{
if
(
this
.
pageData
.
GiveAwayList
[
i
].
GiveAwayNum
>
0
)
{
res
=
this
.
pageData
.
GiveAwayList
[
i
]
getGive
()
{
let
res
=
{}
for
(
let
i
=
0
;
i
<
this
.
pageData
.
GiveAwayList
.
length
;
i
++
)
{
if
(
this
.
pageData
.
GiveAwayList
[
i
].
GiveAwayNum
>
0
)
{
res
=
this
.
pageData
.
GiveAwayList
[
i
]
break
}
}
...
...
@@ -156,7 +163,7 @@
this
.
showQrcode
()
//生成二维码
this
.
isShowQrcode
=
true
setTimeout
(()
=>
{
this
.
flag
=
true
this
.
flag
=
true
this
.
getVerificat
()
},
2000
)
},
...
...
@@ -166,7 +173,7 @@
// 展示二维码
showQrcode
()
{
let
_this
=
this
;
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
this
.
modal_qr
=
true
;
await
_this
.
$refs
.
qrcode
.
crtQrCode
()
},
50
)
...
...
@@ -203,7 +210,7 @@
this
.
isShowSuccess
=
true
this
.
getData
()
clearTimeout
(
this
.
timer
)
}
else
if
(
res
.
data
.
State
===
2
&&
this
.
flag
)
{
}
else
if
(
res
.
data
.
State
===
2
&&
this
.
flag
)
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
getVerificat
()
},
2000
)
...
...
@@ -214,11 +221,19 @@
closePopup
()
{
this
.
isShowSuccess
=
false
},
closeQrcode
(){
this
.
modal_qr
=
false
this
.
flag
=
false
closeQrcode
()
{
this
.
modal_qr
=
false
this
.
flag
=
false
clearTimeout
(
this
.
timer
)
}
},
reloadUserinfo
()
{
this
.
getData
()
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
uni
.
navigateBack
()
},
}
}
</
script
>
...
...
@@ -453,17 +468,18 @@
display
:
flex
;
justify-content
:
center
;
}
.qrcodeBox
{
.qrcodeBox
{
width
:
220px
;
height
:
220px
;
border
:
1px
solid
#000000
;
border
:
1px
solid
#000000
;
border-radius
:
10px
;
padding
:
10px
;
background-color
:
#fff
;
position
:
fixed
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,-
50%
);
transform
:
translate
(
-50%
,
-50%
);
z-index
:
5
;
}
</
style
>
\ No newline at end of file
pages/index/index.vue
View file @
df2b8338
...
...
@@ -48,7 +48,7 @@
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</view>
</view>
<
view
@
click=
'yj'
style=
"width: 200px;height: 50px;"
>
活动
</view
>
<
!--
<view
@
click=
'yj'
style=
"width: 200px;height: 50px;"
>
活动
</view>
--
>
<u-tabs
v-if=
"myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name=
"name"
...
...
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