Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mini_own
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geruidan
mini_own
Commits
b01f240e
Commit
b01f240e
authored
Mar 28, 2023
by
小耗子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改loading
parent
95306307
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
39 deletions
+54
-39
pages/h5/pay.vue
pages/h5/pay.vue
+1
-1
pages/index/index.vue
pages/index/index.vue
+53
-38
No files found.
pages/h5/pay.vue
View file @
b01f240e
...
...
@@ -4,7 +4,7 @@
<view
class=
"pay-container"
v-if=
"!isPay"
>
<view
class=
"pay-info"
>
<text
class=
"info-tips"
>
订单已创建,还需支付
</text>
<view
class=
"money-box"
>
¥
<text
class=
"money"
>
{{
actuallyPay
}}
111
</text></view>
<view
class=
"money-box"
>
¥
<text
class=
"money"
>
{{
actuallyPay
}}
</text></view>
</view>
<u-button
@
click=
"pay"
shape=
"circle"
type=
"primary"
text=
"微信支付"
color=
"#61b077"
></u-button>
</view>
...
...
pages/index/index.vue
View file @
b01f240e
<
template
>
<view
class=
"we-run-page"
>
<view
class=
"contant"
>
<image
src=
"../../static/img/run/bg.png"
class=
"bg"
mode=
"widthFix"
></image>
<view
class=
"we-run-container"
>
<image
src=
"../../static/img/run/runBg.png"
class=
"run-logo"
mode=
"widthFix"
></image>
<view
class=
"run-step-number"
>
<text
class=
"title"
>
今日步数
</text>
<view
class=
"steps"
v-if=
"unregistered"
>
<text
class=
"num"
>
{{
todayNum
?
todayNum
:
'
--
'
}}
</text>
<view
class=
""
>
<view
class=
"load"
>
<u-loading-page
:loading=
"loading"
></u-loading-page>
</view>
<view
class=
"we-run-page"
>
<view
class=
"contant"
>
<image
src=
"../../static/img/run/bg.png"
class=
"bg"
mode=
"widthFix"
></image>
<view
class=
"we-run-container"
>
<image
src=
"../../static/img/run/runBg.png"
class=
"run-logo"
mode=
"widthFix"
></image>
<view
class=
"run-step-number"
>
<text
class=
"title"
>
今日步数
</text>
<view
class=
"steps"
v-if=
"unregistered"
>
<text
class=
"num"
>
{{
todayNum
?
todayNum
:
'
--
'
}}
</text>
</view>
<view
v-else
class=
"steps-empower"
>
<u-button
open-type=
"getPhoneNumber"
@
getphonenumber=
"getInfoPhoneNumber"
type=
"primary"
size=
"normal"
color=
"#00c791"
:plain=
"true"
text=
"授权查看"
></u-button>
</view>
</view>
<view
v-else
class=
"steps-empower"
>
<u-button
open-type=
"getPhoneNumber"
@
getphonenumber=
"getInfoPhoneNumber"
type=
"primary"
size=
"normal"
color=
"#00c791"
:plain=
"true"
text=
"授权查看"
></u-button>
<!--
<image
src=
"../../static/img/run/ranking_btn.png"
class=
"ranking_btn"
mode=
"widthFix"
></image>
-->
<view
class=
"runDataExplain"
>
<view
class=
"explain"
>
使用说明:
</view>
<text
class=
""
>
您在微信授权登录后如未能正常显示步数,请检查以下微信项目设置无误:
1、微信运动已启用
2、微信运动已设置数据来源。具体见进入微信运动--设置(右上角齿轮图标)-数据来源
</text>
</view>
</view>
<!--
<image
src=
"../../static/img/run/ranking_btn.png"
class=
"ranking_btn"
mode=
"widthFix"
></image>
-->
<view
class=
"runDataExplain"
>
<view
class=
"explain"
>
使用说明:
</view>
<text
class=
""
>
您在微信授权登录后如未能正常显示步数,请检查以下微信项目设置无误:
1、微信运动已启用
2、微信运动已设置数据来源。具体见进入微信运动--设置(右上角齿轮图标)-数据来源
</text>
</view>
</view>
<u-tabbar
:value=
"tabBarVal"
@
change=
"changeTabBar"
:fixed=
"true"
:placeholder=
"true"
activeColor=
"#00c791"
:safeAreaInsetBottom=
"true"
>
<u-tabbar-item
text=
"步数"
name=
"步数"
>
<image
class=
"u-page__item__slot-icon"
slot=
"active-icon"
src=
"../../static/img/run/tabbar_Index1.png"
>
</image>
<image
class=
"u-page__item__slot-icon"
slot=
"inactive-icon"
src=
"../../static/img/run/tabbar_Index.png"
>
</image>
</u-tabbar-item>
<u-tabbar-item
text=
"商城"
name=
"商城"
>
<image
class=
"u-page__item__slot-icon"
slot=
"active-icon"
src=
"../../static/img/run/tabbar_shop1.png"
>
</image>
<image
class=
"u-page__item__slot-icon"
slot=
"inactive-icon"
src=
"../../static/img/run/tabbar_shop.png"
>
</image>
</u-tabbar-item>
</u-tabbar>
</view>
<u-tabbar
:value=
"tabBarVal"
@
change=
"changeTabBar"
:fixed=
"true"
:placeholder=
"true"
activeColor=
"#00c791"
:safeAreaInsetBottom=
"true"
>
<u-tabbar-item
text=
"步数"
name=
"步数"
>
<image
class=
"u-page__item__slot-icon"
slot=
"active-icon"
src=
"../../static/img/run/tabbar_Index1.png"
>
</image>
<image
class=
"u-page__item__slot-icon"
slot=
"inactive-icon"
src=
"../../static/img/run/tabbar_Index.png"
>
</image>
</u-tabbar-item>
<u-tabbar-item
text=
"商城"
name=
"商城"
>
<image
class=
"u-page__item__slot-icon"
slot=
"active-icon"
src=
"../../static/img/run/tabbar_shop1.png"
>
</image>
<image
class=
"u-page__item__slot-icon"
slot=
"inactive-icon"
src=
"../../static/img/run/tabbar_shop.png"
>
</image>
</u-tabbar-item>
</u-tabbar>
</view>
</
template
>
<
script
>
...
...
@@ -53,6 +58,7 @@
export
default
{
data
()
{
return
{
loading
:
true
,
unregistered
:
true
,
tabBarVal
:
'
步数
'
,
registerPopup
:
true
,
...
...
@@ -100,13 +106,16 @@
if
(
auth
==
0
)
{
let
runData
=
await
this
.
getWeRunDataFn
();
runData
&&
(
this
.
unregistered
=
true
);
this
.
loading
=
false
;
}
else
if
(
auth
==
2001
)
{
this
.
unregistered
=
false
;
this
.
loading
=
false
;
}
},
async
loginSession
()
{
let
token
=
uni
.
getStorageSync
(
'
token
'
);
let
that
=
this
;
//
/**
* session有效{
用户注册:token有/无/失效 homepaeg- authcheck(2001)- code-wxRun
...
...
@@ -120,11 +129,13 @@
* *
*/
if
(
this
.
checkSessionStatus
&&
token
)
{
this
.
loading
=
true
;
let
token
=
uni
.
getStorageSync
(
'
token
'
);
console
.
log
(
"
token的值====================
"
+
token
)
this
.
authAndWeRun
();
}
else
{
// session 不存在,调用login。userInfo 。更新session
this
.
loading
=
false
;
uni
.
login
({
success
:
function
(
info
)
{
//调用code
console
.
log
(
"
code000000000000000000000000==========
"
,
info
.
code
)
...
...
@@ -184,13 +195,17 @@
}
</
script
>
<
style
lang=
"scss"
scoped
>
.
load
:
:
v-deep
.
vue-ref
{
// z-index: 1;
}
.we-run-page
{
background-color
:
#fff
;
.contant
{
height
:
calc
(
100%
-
100px
-
env
(
safe-area-inset-bottom
));
box-sizing
:
border-box
;
position
:
relative
;
//
position: relative;
.bg
{
width
:
100%
;
...
...
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