Commit b01f240e authored by 小耗子's avatar 小耗子

修改loading

parent 95306307
......@@ -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>
......
<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%;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment