Compare commits

...

2 Commits

Author SHA1 Message Date
左哥
c43b52fbba dsds 2025-07-04 22:09:02 +08:00
左哥
2f4bd78d60 dsds 2025-07-04 21:28:28 +08:00
4 changed files with 22 additions and 15 deletions

View File

@ -1,5 +1,5 @@
const baseUrl = 'https://ddbs.1024tool.vip/';
let isNavigatingToLogin = false;
function request(url, method = 'GET', data = {}) {
const header = {
'content-type': 'application/json',
@ -21,12 +21,19 @@ function request(url, method = 'GET', data = {}) {
if (res.data.code) {
if (res.data.code == 10103) {
wx.removeStorageSync('access_token');
// wx.switchTab({
// url: '/pages/my/index',
// })
wx.navigateTo({
url: '/pages/login/login',
})
if (!isNavigatingToLogin) {
const pages = getCurrentPages();
const currentRoute = pages[pages.length - 1]?.route;
if (currentRoute !== 'pages/login/login') {
isNavigatingToLogin = true;
wx.navigateTo({
url: '/pages/login/login',
complete: () => {
isNavigatingToLogin = false;
}
});
}
}
reject(res.data);
}
reject(res.data);

View File

@ -1,6 +1,6 @@
import * as echarts from '../../ec-canvas/echarts.min';
import request from '~/api/request';
import { heightList, weightList } from '../../assets/js/heightWeight';
import { heightList, weightList } from '~/assets/js/heightWeight';
const app = getApp();
Page({

View File

@ -66,22 +66,22 @@
</view>
<text class="echarts-title">{{activeIndex == 0 ? '身高cm':'体重g'}}</text>
<view class="echarts-canvas-container">
<ec-canvas wx:if="{{ activeIndex == 0 }}" id="mychart-dom-height" canvas-id="mychart-height" ec="{{ ec }}" force-use-old-canvas="true"></ec-canvas>
<ec-canvas wx:else id="mychart-dom-weight" canvas-id="mychart-weight" ec="{{ ec2 }}" force-use-old-canvas="true"></ec-canvas>
<ec-canvas wx:if="{{ activeIndex == 0 }}" id="mychart-dom-height" canvas-id="mychart-height" ec="{{ ec }}" ></ec-canvas>
<ec-canvas wx:else id="mychart-dom-weight" canvas-id="mychart-weight" ec="{{ ec2 }}" ></ec-canvas>
</view>
</view>
<view class="item-title">
总胆红素趋势</view>
<view class="item-content">
<view class="echarts-canvas-container">
<ec-canvas id="mychart-dom-direct" canvas-id="mychart-direct" ec="{{ ec3 }}" force-use-old-canvas="true"></ec-canvas>
<ec-canvas id="mychart-dom-direct" canvas-id="mychart-direct" ec="{{ ec3 }}" ></ec-canvas>
</view>
</view>
<view class="item-title">
直接胆红素趋势</view>
<view class="item-content">
<view class="echarts-canvas-container">
<ec-canvas id="mychart-dom-indirect" canvas-id="mychart-indirect" ec="{{ ec4 }}" force-use-old-canvas="true"></ec-canvas>
<ec-canvas id="mychart-dom-indirect" canvas-id="mychart-indirect" ec="{{ ec4 }}" ></ec-canvas>
</view>

View File

@ -2,7 +2,7 @@
<view class="box_1">
<view class="image_1"></view>
<view class="image-wrapper_1">
<text class="iconfont icon-fanhui image_2" bind:tap="toBack"></text>
<!-- <text class="iconfont icon-fanhui image_2" bind:tap="toBack"></text> -->
</view>
</view>
<view class="box_2">
@ -13,13 +13,13 @@
<view class="section_1">
<view class="image-text_1">
<text class="iconfont icon-shouji thumbnail_1"></text>
<input lines="1" type="number" class="text-group_2" maxlength="11" placeholder="请输入手机号" data-mode="mobile" value="{{mobile}}"></input>
<input bindchange="bindKeyInput" lines="1" type="number" class="text-group_2" maxlength="11" placeholder="请输入手机号" data-mode="mobile" value="{{mobile}}"></input>
</view>
</view>
<view class="section_2">
<view class="image-text_2">
<text class="iconfont icon-mima1 thumbnail_2"></text>
<input lines="1" type="text" class="text-group_3" placeholder="请输入密码" data-mode="password" password="{{!showPassword}}" value="{{password}}"></input>
<input bindchange="bindKeyInput" lines="1" type="text" class="text-group_3" placeholder="请输入密码" data-mode="password" password="{{!showPassword}}" value="{{password}}"></input>
<text class="iconfont icon-yanjing_yincang yanjing" wx:if="{{!showPassword}}" bindtap="togglePassword"></text>
<text class="iconfont icon-yanjing-xianshi yanjing" wx:if="{{showPassword}}" bindtap="togglePassword"></text>
</view>