Compare commits

...

14 Commits
master ... main

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

@ -0,0 +1,16 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

@ -0,0 +1,84 @@
<script>
export default {
onLaunch: function() {
//
let notifiedSleepTime = false; //
let notifiedExerciseTime = false; //
setInterval(() => {
//
const remindTime = uni.getStorageSync('remindTime');
const currentTime = this.getCurrentTime(); // "HH:mm"
if (remindTime && remindTime.sleepTime === currentTime && !notifiedSleepTime) {
uni.showModal({
title: '提醒',
content: '睡眠时间到了!',
showCancel: false
});
notifiedSleepTime = true; //
}
if (remindTime && remindTime.exerciseTime === currentTime && !notifiedExerciseTime) {
uni.showModal({
title: '提醒',
content: '运动时间到了!',
showCancel: false
});
notifiedExerciseTime = true; //
}
//
if (currentTime === '00:00') {
notifiedSleepTime = false;
notifiedExerciseTime = false;
}
//
const yjDate = uni.getStorageSync('yjDate');
const currentDate = this.getCurrentDate(); // "YYYY-MM-DD"
if (yjDate && currentDate === yjDate.nextPeriod) {
const currentHour = new Date().getHours();
if (currentHour >= 8) {
uni.removeStorageSync('yjDate');
uni.showModal({
title: '提醒',
content: '经期时间到了!',
showCancel: false,
success: () => {
// yjDate
}
});
}
}
}, 1000);
},
onShow: function() {
},
onHide: function() {
console.log('App Hide')
},
methods: {
getCurrentTime() {
const now = new Date();
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
return `${hours}:${minutes}`;
},
// "YYYY-MM-DD"
getCurrentDate() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
}
}
</script>
<style>
/*每个页面公共css */
</style>

@ -0,0 +1,30 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import {
myRequest
} from './util/api.js'
Vue.prototype.$myRequest = myRequest
Vue.config.productionTip = false
Vue.prototype.$BASE_URL = 'https://www.yingcloud.com:8000'
Vue.prototype.$BASE_URL_MEDIA = 'https://www.yingcloud.com:8000/media/'
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

@ -0,0 +1,83 @@
{
"name" : "hyy",
"appid" : "__UNI__9F628B4",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"statusbar" : {
"immersed" : false
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {
"geolocation" : {}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx7fd4c57dfed68264",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "运动打卡功能需要定位"
}
},
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ]
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
}

@ -0,0 +1,97 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/welcome/welcome",
"style": {
"navigationBarTitleText": "健康监测",
"enablePullDownRefresh": false
}
},
{
"path": "pages/message/message",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/test/test",
"style": {
"navigationBarTitleText": "健康监测",
"enablePullDownRefresh": false
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "健康监测",
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/yddk/yddk",
"style": {
"navigationBarTitleText": "运动打卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/zxtx/zxtx",
"style": {
"navigationBarTitleText": "作息提醒",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/scgl/scgl",
"style": {
"navigationBarTitleText": "身材管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/jqjl/jqjl",
"style": {
"navigationBarTitleText": "月经记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/yddk/add",
"style": {
"navigationBarTitleText": "打卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}
],
"tabBar": {
"color": "#333333",
"selectedColor": "#28C76F",
"list": [{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "static/main(1).png",
"selectedIconPath": "static/main(1).png"
},
{
"text": "我的",
"pagePath": "pages/message/message",
"iconPath": "static/myself(1).png",
"selectedIconPath": "static/myself(1).png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "健康监测",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}

@ -0,0 +1,88 @@
<template>
<view class="content">
<view class="text-area">
<text class="title">{{title}}</text>
</view>
<image class="logo" src="/static/k4.png"></image>
<button type="primary" class="jump-btn" @click="jumpToCalculationPage1"></button>
<button type="primary" class="jump-btn" @click="jumpToCalculationPage2"></button>
<button type="primary" class="jump-btn" @click="jumpToCalculationPage3"></button>
<button type="primary" class="jump-btn" @click="jumpToCalculationPage4"></button>
</view>
</template>
<script>
export default {
data() {
return {
title: ' '
}
},
onLoad() {
},
methods: {
jumpToCalculationPage1() {
uni.navigateTo({
url: '/pages/zxtx/zxtx'
});
},
jumpToCalculationPage2() {
uni.navigateTo({
url: '/pages/scgl/scgl'
});
},
jumpToCalculationPage3() {
uni.navigateTo({
url: '/pages/yddk/yddk'
});
},
jumpToCalculationPage4() {
uni.navigateTo({
url: '/pages/jqjl/jqjl'
});
},
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 500rpx;
width: 800rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.enter {
position: absolute;
top: 800rpx;
left: 320rpx;
}
button {
font-size: 35rpx;
width: 90%;
border-radius: 9999rpx;
margin: 20rpx 0rpx;
}
</style>

@ -0,0 +1,170 @@
<template>
<view class="container">
<view class="title">月经记录</view>
<view class="date-picker">
<text class="label">经期来的日期</text>
<picker mode="date" @change="handleDateChange">
<view class="picker">
{{ currentDate }}
<text class="arrow"></text>
</view>
</picker>
</view>
<view class="prediction">
<text class="label">预测下次经期</text>
<text class="next-period">{{ nextPeriod }}</text>
</view>
<button class="btn" @click="setReminder"></button>
<view class="submit-wrap">
<view class="submit-title">
历史设置
</view>
<view class="submit-item" v-for="(item,index) in jqList" :key="index">
{{index+1}}. 记录时间:{{item.currentDate}} 预测时间:{{item.nextPeriod}}
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
currentDate: "", //
nextPeriod: "", //
jqList: []
};
},
onLoad() {
const yjDate = uni.getStorageSync('yjDate');
if (yjDate) {
this.currentDate = yjDate.currentDate;
this.predictNextPeriod();
}
const jqList = uni.getStorageSync('jqList');
this.jqList = jqList;
},
methods: {
handleDateChange(e) {
this.currentDate = e.detail.value;
//
this.predictNextPeriod();
},
predictNextPeriod() {
//
// 2828
const selectedDate = new Date(this.currentDate);
const nextPeriodDate = new Date(selectedDate.getTime() + 28 * 24 * 60 * 60 * 1000);
const year = nextPeriodDate.getFullYear();
const month = nextPeriodDate.getMonth() + 1;
const day = nextPeriodDate.getDate();
this.nextPeriod = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
},
setReminder() {
//
// 使
if (this.nextPeriod == '') {
wx.showToast({
title: '请选择经期来的日期',
icon: 'none',
duration: 2000
});
return
}
wx.showToast({
title: '提醒设置成功',
icon: 'success',
duration: 2000
});
let jqList = uni.getStorageSync('jqList');
if (jqList) {
jqList.push({
currentDate: this.currentDate,
nextPeriod: this.nextPeriod
})
} else {
jqList = [{
currentDate: this.currentDate,
nextPeriod: this.nextPeriod
}]
}
uni.setStorageSync('jqList', jqList);
this.jqList = jqList;
uni.setStorageSync('yjDate', {
currentDate: this.currentDate,
nextPeriod: this.nextPeriod
})
}
}
};
</script>
<style lang="scss">
.container {
margin: 20px;
}
.title {
font-size: 20px;
margin-bottom: 20px;
}
.date-picker {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.label {
font-size: 16px;
margin-right: 10px;
}
.picker {
display: flex;
align-items: center;
border: 1px solid #ccc;
padding: 5px 10px;
}
.arrow {
margin-left: 5px;
font-size: 12px;
}
.prediction {
font-size: 16px;
margin-bottom: 20px;
}
.btn {
width: 100%;
padding: 10rpx;
font-size: 16px;
border-radius: 5px;
background-color: #007aff;
color: #fff;
text-align: center;
}
.submit-wrap {
width: 100%;
margin: 0px auto;
margin-top: 30rpx;
.submit-title {
color: #007aff;
border-left: 8px solid #007aff;
padding-left: 30rpx;
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.submit-item {
margin: 15rpx 0rpx;
}
}
</style>

@ -0,0 +1,126 @@
<template>
<view>
<view class="login" v-show="isAuthorization">
<view class="uni-common-mt">
<view class="uni-form-item uni-colmn">
<view class="login_label">登录</view>
</view>
<view class="uni-form-item uni-column">
<view>
<input class="uni-input" v-model="username" focus placeholder="账号" />
</view>
</view>
<view class="uni-form-item uni-column">
<view>
<input class="uni-input" v-model="password" hold-keyboard placeholder="密码" password=true>
</view>
</view>
<view class="uni-form-item uni-column">
<view>
<button type="primary" @click="user_login"></button>
</view>
</view>
</view>
</view>
<view class="message" v-show="!isAuthorization">
<view class="message_item" v-for="(item,index) in messages" :key="index">
<image :src="base_url+item.holddeviceimg"></image>
<view class="right">
<view class="message_content">
{{item.message.slice(0,22)}}
</view>
<view class="messge_channel">
<view>
<text class="device">{{item.holddevice}}</text> -{{item.datachannel}}
</view>
<view class="info">
<text class="timestamp">{{item.timestamp | formatDate}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isAuthorization: true,
username: '',
password: '',
"message": [],
"base_url": this.$BASE_URL_MEDIA,
}
},
methods: {
async user_login() {
await uni.request({
url: this.$BASE_URL + '/token-api/token/',
method: 'POST',
data: {
'username': this.username,
'password': this.password
},
sucess: async (res) => {
if (res.statusCode !== 200 && res.statusCode !== 201) {
return uni.showToast({
title: "请求失败"
})
} else {
this.isAuthorization = false
console.log(res.data)
uni.setStorageSync("Access_token", res.data.access)
const response_message = await this.$myRequest({
url: '/rest-auth/devholder/holddevmessage/',
method: 'GET',
})
if (response_message.statusCode === 200) {
console.log(response_message.data)
this.messages = response_message.data;
}
}
},
fail: (err) => {
return uni.showToast({
title: "请求接口失败"
})
},
})
//console.log(response)
}
}
}
</script>
<style lang="scss">
.login {
padding: 20rpx 40rpx;
margin: 200rpx 20rpx;
text-align: center;
background-color: #eee;
.login_label {
color: #333333;
margin: 0 auto;
}
.uni-input {
background-color: #fff;
height: 80rpx;
text-align: left;
padding-left: 10rpx;
border-radius: 10rpx;
font-size: 30rpx;
}
.uni-form-item {
margin: 30rpx 0;
}
button {
font-size: 30rpx;
}
}
</style>

@ -0,0 +1,180 @@
<template>
<view class="container">
<view class="title">BMI计算器</view>
<view class="input-wrapper">
<text class="label">身高(cm)</text>
<input placeholder="请输入身高" class="input" type="number" v-model="height" />
</view>
<view class="input-wrapper">
<text class="label">体重(kg)</text>
<input placeholder="请输入体重" class="input" type="number" v-model="weight" />
</view>
<button class="calculate-btn" @click="calculateBMI">BMI</button>
<!-- <view class="result" v-if="resultVisible">
<text>您的BMI指数为</text>
<text class="bmi">{{ bmi }}</text>
<br />
<text>{{ interpretation }}</text>
</view> -->
<button class="jump-btn" @click="jumpToPreviousPage"></button>
<view class="submit-wrap">
<view class="submit-title">
查询记录
</view>
<view class="submit-item" v-for="(item,index) in bimList" :key="index">
{{index+1}}. BMI指数:{{item.bmi}} {{item.interpretation}}
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
height: '',
weight: '',
resultVisible: false,
bmi: '',
interpretation: '',
bimList: []
};
},
onLoad() {
const bimList = uni.getStorageSync('bimList');
this.bimList = bimList;
},
methods: {
calculateBMI() {
const height = parseFloat(this.height);
const weight = parseFloat(this.weight);
if (isNaN(height) || isNaN(weight)) {
uni.showToast({
title: '请填写正确的身高和体重',
icon: 'none'
});
return;
}
const bmi = (weight / ((height / 100) * (height / 100))).toFixed(1);
let interpretation = '';
if (bmi < 18.5) {
interpretation = '您的体重过轻';
} else if (bmi >= 18.5 && bmi < 24) {
interpretation = '您的体重正常';
} else if (bmi >= 24 && bmi < 28) {
interpretation = '您的体重过重';
} else if (bmi >= 28) {
interpretation = '您的体重肥胖';
}
this.bmi = bmi;
this.interpretation = interpretation;
uni.showModal({
content: '您的BMI指数为:' + bmi + ' ' + interpretation,
success: (res) => {
}
})
let bimList = uni.getStorageSync('bimList');
if (bimList) {
bimList.push({
bmi,
interpretation
})
} else {
bimList = [{
bmi,
interpretation
}]
}
uni.setStorageSync('bimList', bimList);
this.bimList = bimList;
this.resultVisible = true;
},
jumpToPreviousPage() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss">
.container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 30px;
}
.title {
font-size: 20px;
font-weight: bold;
margin-bottom: 20px;
}
.input-wrapper {
display: flex;
align-items: center;
margin-bottom: 20px;
width: 90%;
}
.label {
width: 80px;
}
.input {
flex: 1;
border-bottom: 1px solid #eee;
}
.calculate-btn {
height: 50px;
background-color: #1aad19;
color: #fff;
border-radius: 20px;
text-align: center;
line-height: 50px;
margin-bottom: 20px;
width: 90%;
border-radius: 9999px;
}
.result {
margin-top: 10px;
}
.bmi {
font-weight: bold;
}
.jump-btn {
height: 50px;
line-height: 50px;
background-color: #007aff;
width: 90%;
color: #fff;
border-radius: 9999px;
text-align: center;
}
.submit-wrap{
width: 90%;
margin: 0px auto;
margin-top: 30rpx;
.submit-title{
color: #1aad19;
border-left: 8px solid #1aad19;
padding-left: 30rpx;
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.submit-item{
margin: 15rpx 0rpx;
}
}
</style>

@ -0,0 +1,22 @@
<template>
<view>
hello,iotui
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

@ -0,0 +1,52 @@
<template>
<view>
<swiper class="swiper" circular indicator-dots="true" autoplay="true" interval=2000 duration=500>
<swiper-item class="swiper-item">
<image src="../../static/k2.png"></image>
</swiper-item>
<swiper-item class="swiper-item">
<image src="../../static/k1.png"></image>
</swiper-item>
</swiper>
<view class="enter">
<navigator url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover">
<button type="primary" size="mini">进入首页</button>
</navigator>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.swiper {
height: 100vh;
}
.swiper-item {
text_align: center;
height: 100%;
image {
width: 100%;
height: 100%;
}
}
.enter {
position: absolute;
top: 800rpx;
left: 320rpx;
}
</style>

@ -0,0 +1,154 @@
<template>
<view class="container">
<view class="photo-card">
<view class="card-header">
<view>
<label>打卡时间</label>
<label>{{submit.date}}</label>
</view>
<view>
<label>打卡位置</label>
<label @click="handleAddress">{{submit.address}}</label>
</view>
</view>
<view class="card-body">
<image v-if="submit.photoUrl" mode="scaleToFill" class="photo" :src="submit.photoUrl"></image>
<button v-if="!submit.photoUrl" class="upload-btn" @tap="chooseImage()"></button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
submit: {
date: '',
address: '点击选择位置',
photoUrl: ''
}
};
},
onLoad() {
this.submit.date = this.getCurrentDateTime()
},
methods: {
handleAddress() {
uni.getLocation({
success: (res) => {
wx.chooseLocation({
latitude: res.latitude,
longitude: res.longitude,
success: (res) => {
this.submit.address = res.address;
},
});
}
})
},
chooseImage() {
if (this.submit.address == '' || this.submit.address == '点击选择位置') {
uni.showToast({
icon: 'none',
title: '请选择位置'
})
return
}
uni.chooseImage({
count: 1,
success: res => {
const tempFilePath = res.tempFilePaths[0];
this.uploadImage(tempFilePath);
},
});
},
getCurrentDateTime() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}`;
},
uploadImage(filePath) {
uni.showLoading({
title: '上传中',
});
//
setTimeout(() => {
uni.hideLoading();
this.submit.photoUrl = filePath;
uni.showToast({
title: '打卡成功',
icon: 'success',
});
let signList = uni.getStorageSync('signList');
if (signList) {
signList.push(this.submit)
} else {
signList = [this.submit]
}
uni.setStorageSync('signList', signList);
}, 2000);
},
},
};
</script>
<style lang="scss">
.container {
padding: 20px;
}
.photo-card {
margin-bottom: 20px;
background-color: #f1f1f1;
border-radius: 8px;
overflow: hidden;
}
.card-header {
display: flex;
flex-direction: column;
padding: 10px;
background-color: #f1f1f1;
view {
display: flex;
justify-content: space-between;
margin: 10rpx 0rpx;
}
}
.date {
font-size: 16px;
font-weight: bold;
}
.status {
color: #999;
}
.card-body {
padding: 10px;
text-align: center;
}
.photo {
width: 100%;
height: 200px;
object-fit: cover;
}
.upload-btn {
margin-top: 10px;
padding: 0px 16px;
background-color: #4b7fff;
color: #fff;
border-radius: 4px;
}
</style>

@ -0,0 +1,121 @@
<template>
<view class="container">
<view v-if="photoCards.length">
<view class="photo-card" v-for="card in photoCards" :key="card.date">
<view class="card-header">
<view>
<label>打卡时间</label>
<label>{{card.date}}</label>
</view>
<view>
<label>打卡位置</label>
<label>{{card.address}}</label>
</view>
</view>
<view class="card-body">
<image class="photo" :src="card.photoUrl"></image>
</view>
</view>
</view>
<view v-else class="sign-empty">
- 暂无打卡记录 -
</view>
<view class="add" @click="handleAdd">
打卡
</view>
</view>
</template>
<script>
export default {
data() {
return {
photoCards: [],
};
},
onShow() {
let signList = uni.getStorageSync('signList');
if (signList) {
this.photoCards = signList;
}
},
methods: {
handleAdd() {
uni.navigateTo({
url: '/pages/yddk/add'
})
}
},
};
</script>
<style lang="scss">
.container {
padding: 20px;
}
.photo-card {
margin-bottom: 20px;
background-color: #f1f1f1;
border-radius: 8px;
overflow: hidden;
}
.card-header {
display: flex;
flex-direction: column;
padding: 10px;
background-color: #f1f1f1;
view {
display: flex;
justify-content: space-between;
margin: 10rpx 0rpx;
}
}
.date {
font-size: 16px;
font-weight: bold;
}
.status {
color: #999;
}
.card-body {
padding: 10px;
text-align: center;
}
.photo {
width: 100%;
height: 200px;
object-fit: cover;
}
.upload-btn {
margin-top: 10px;
padding: 8px 16px;
background-color: #4b7fff;
color: #fff;
border-radius: 4px;
}
.add {
position: fixed;
right: 50rpx;
bottom: 100rpx;
background: #4b7fff;
color: #fff;
font-size: 32rpx;
padding: 40rpx 30rpx;
border-radius: 999rpx;
}
.sign-empty {
text-align: center;
padding: 30rpx 0rpx;
color: gray;
}
</style>

@ -0,0 +1,124 @@
<template>
<view class="container">
<view>
<swiper class="swiper" circular indicator-dots="true" autoplay="true" interval=3000 duration=500>
<swiper-item class="swiper-item">
<image src="../../static/k5(1)(1).png"></image>
</swiper-item>
<swiper-item class="swiper-item">
<image src="../../static/k6(1)(1).png"></image>
</swiper-item>
</swiper>
</view>
<view class="section">
<text>选择睡眠时间</text>
<picker mode="time" @change="bindSleepTimeChange">
<view class="picker">{{sleepTime}}</view>
</picker>
</view>
<view class="section">
<text>选择运动时间</text>
<picker mode="time" @change="bindExerciseTimeChange">
<view class="picker">{{exerciseTime}}</view>
</picker>
</view>
<button @click="setReminders" class="btn">设置提醒</button>
</view>
</template>
<script>
export default {
data() {
return {
sleepTime: '请选择睡眠时间',
exerciseTime: '请选择运动时间'
}
},
onLoad() {
const remindTime = uni.getStorageSync('remindTime');
console.log(remindTime)
if(remindTime){
this.sleepTime = remindTime.sleepTime;
this.exerciseTime = remindTime.exerciseTime;
}
},
methods: {
bindSleepTimeChange(e) {
this.sleepTime = e.detail.value;
},
bindExerciseTimeChange(e) {
this.exerciseTime = e.detail.value;
},
setReminders() {
if (this.sleepTime == '请选择睡眠时间') {
uni.showToast({
icon: 'none',
title: '请选择睡眠时间'
})
return
}
if (this.exerciseTime == '请选择运动时间') {
uni.showToast({
icon: 'none',
title: '请选择运动时间'
})
return
}
uni.setStorageSync('remindTime', {
sleepTime: this.sleepTime,
exerciseTime: this.exerciseTime
})
uni.showToast({
icon: 'none',
title: '设置提醒成功!'
})
}
},
}
</script>
<style lang="scss">
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.section {
margin: 30rpx 0rpx;
width: 90%;
}
.picker {
margin-top: 20rpx;
border: 1px solid #55aaff;
border-radius: 15rpx;
padding: 20rpx 20rpx;
height: 40rpx;
width: 90%;
text-align: center;
}
.btn {
background-color: #55aaff;
color: #f8feff;
padding: 0rpx 20px;
width: 90%;
border-radius: 5px;
}
.swiper {
height: 200px;
width: 100vw;
}
.swiper-item {
text_align: center;
width: 100%;
image {
width: 100%;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -0,0 +1,10 @@
uni.addInterceptor({
returnValue (res) {
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1]));
});
},
});

@ -0,0 +1,76 @@
/**
* uni-app
*
* uni-app https://ext.dcloud.net.cn使
* 使scss使 import 便App
*
*/
/**
* App使
*
* 使scss scss 使 import
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//
$uni-text-color-inverse:#fff;//
$uni-text-color-grey:#999;//
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; //
/* 文章场景相关 */
$uni-color-title: #2C405A; //
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; //
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; //
$uni-font-size-paragraph:15px;

@ -0,0 +1,12 @@
// 本文件用于使用JQL语法操作项目关联的uniCloud空间的数据库方便开发调试和远程数据库管理
// 编写clientDB的js API也支持常规js语法比如var可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
// 可以全部运行也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
// 如果文档中存在多条JQL语句只有最后一条语句生效
// 如果混写了普通js最后一条语句需是数据库操作语句
// 此处代码运行不受DB Schema的权限控制移植代码到实际业务中注意在schema中配好permission
// 不支持clientDB的action
// 数据库查询有最大返回条数限制详见https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
// 详细JQL语法请参考https://uniapp.dcloud.net.cn/uniCloud/jql.html
// 下面示例查询uni-id-users表的所有数据
db.collection('uni-id-users').get();

@ -0,0 +1,6 @@
## 0.0.32022-11-11
- 修复 config 方法获取根节点为数组格式配置时错误的转化为了对象的Bug
## 0.0.22021-04-16
- 修改插件package信息
## 0.0.12021-03-15
- 初始化项目

@ -0,0 +1,81 @@
{
"id": "uni-config-center",
"displayName": "uni-config-center",
"version": "0.0.3",
"description": "uniCloud 配置中心",
"keywords": [
"配置",
"配置中心"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "unicloud-template-function"
},
"directories": {
"example": "../../../scripts/dist"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "u"
},
}
}
}
}

@ -0,0 +1,93 @@
# 为什么使用uni-config-center
实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构
```bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ ├─index.js
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b // plugin-b对应的目录
├─index.js
└─config.json // plugin-b对应的配置文件
```
假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。
uni-config-center就是用了统一管理这些配置文件的使用uni-config-center后的目录结构如下
```bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ └─index.js
├─plugin-b // plugin-b对应的目录
│ └─index.js
└─uni-config-center
├─index.js // config-center入口文件
├─plugin-a
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b
└─config.json // plugin-b对应的配置文件
```
使用uni-config-center后的优势
- 配置文件统一管理,分离插件主体和配置信息,更新插件更方便
- 支持对config.json设置schema插件使用者在HBuilderX内编写config.json文件时会有更好的提示后续HBuilderX会提供支持
# 用法
在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖请参考[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common)
```js
const createConfig = require('uni-config-center')
const uniIdConfig = createConfig({
pluginId: 'uni-id', // 插件id
defaultConfig: { // 默认配置
tokenExpiresIn: 7200,
tokenExpiresThreshold: 600,
},
customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并
// defaudltConfig 默认配置
// userConfig 用户配置
return Object.assign(defaultConfig, userConfig)
}
})
// 以如下配置为例
// {
// "tokenExpiresIn": 7200,
// "passwordErrorLimit": 6,
// "bindTokenToDevice": false,
// "passwordErrorRetryTime": 3600,
// "app-plus": {
// "tokenExpiresIn": 2592000
// },
// "service": {
// "sms": {
// "codeExpiresIn": 300
// }
// }
// }
// 获取配置
uniIdConfig.config() // 获取全部配置注意uni-config-center内不存在对应插件目录时会返回空对象
uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置返回7200
uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置返回300
uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置如果不存在则取传入的默认值返回600
// 获取文件绝对路径
uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径
// 引用文件require
uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined文件内有其他错误导致require失败时会抛出错误。
// 判断是否包含某文件
uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件true: 文件存在false: 文件不存在
```

@ -0,0 +1,9 @@
{
"name": "uni-config-center",
"version": "0.0.3",
"description": "配置中心",
"main": "index.js",
"keywords": [],
"author": "DCloud",
"license": "Apache-2.0"
}

@ -0,0 +1,32 @@
## 1.0.162023-04-25
- 新增maxTokenLength配置用于限制数据库用户记录token数组的最大长度
## 1.0.152023-04-06
- 修复部分语言国际化出错的Bug
## 1.0.142023-03-07
- 修复 admin用户包含其他角色时未包含在token的Bug
## 1.0.132022-07-21
- 修复 创建token时未传角色权限信息生成的token不正确的bug
## 1.0.122022-07-15
- 提升与旧版本uni-id的兼容性补充读取配置文件时回退平台app-plus、h5但是仍推荐使用新平台名进行配置app、web
## 1.0.112022-07-14
- 修复 部分情况下报`read property 'reduce' of undefined`的错误
## 1.0.102022-07-11
- 将token存储在用户表的token字段内与旧版本uni-id保持一致
## 1.0.92022-07-01
- checkToken兼容token内未缓存角色权限的情况此时将查库获取角色权限
## 1.0.82022-07-01
- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
## 1.0.72022-06-30
- 修复config文件不合法时未抛出具体错误的Bug
## 1.0.62022-06-28
- 移除插件内的数据表schema
## 1.0.52022-06-27
- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug
## 1.0.42022-06-27
- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945)
## 1.0.22022-06-23
- 对齐旧版本uni-id默认配置
## 1.0.12022-06-22
- 补充对uni-config-center的依赖
## 1.0.02022-06-21
- 提供uni-id token创建、校验、刷新接口简化旧版uni-id公共模块

@ -0,0 +1,84 @@
{
"id": "uni-id-common",
"displayName": "uni-id-common",
"version": "1.0.16",
"description": "包含uni-id token生成、校验、刷新功能的云函数公共模块",
"keywords": [
"uni-id-common",
"uniCloud",
"token",
"权限"
],
"repository": "https://gitcode.net/dcloud/uni-id-common",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "unicloud-template-function"
},
"uni_modules": {
"dependencies": ["uni-config-center"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

@ -0,0 +1,3 @@
# uni-id-common
文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)

@ -0,0 +1,16 @@
{
"name": "uni-id-common",
"version": "1.0.16",
"description": "uni-id token生成、校验、刷新",
"main": "index.js",
"homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html",
"repository": {
"type": "git",
"url": "git+https://gitee.com/dcloud/uni-id-common.git"
},
"author": "DCloud",
"license": "Apache-2.0",
"dependencies": {
"uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center",
}
}

@ -0,0 +1,89 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
if (!Math) {
"./pages/welcome/welcome.js";
"./pages/message/message.js";
"./pages/test/test.js";
"./pages/index/index.js";
"./pages/yddk/yddk.js";
"./pages/zxtx/zxtx.js";
"./pages/scgl/scgl.js";
"./pages/jqjl/jqjl.js";
"./pages/yddk/add.js";
}
const _sfc_main = {
onLaunch: function() {
let notifiedSleepTime = false;
let notifiedExerciseTime = false;
setInterval(() => {
const remindTime = common_vendor.index.getStorageSync("remindTime");
const currentTime = this.getCurrentTime();
if (remindTime && remindTime.sleepTime === currentTime && !notifiedSleepTime) {
common_vendor.index.showModal({
title: "提醒",
content: "睡眠时间到了!",
showCancel: false
});
notifiedSleepTime = true;
}
if (remindTime && remindTime.exerciseTime === currentTime && !notifiedExerciseTime) {
common_vendor.index.showModal({
title: "提醒",
content: "运动时间到了!",
showCancel: false
});
notifiedExerciseTime = true;
}
if (currentTime === "00:00") {
notifiedSleepTime = false;
notifiedExerciseTime = false;
}
const yjDate = common_vendor.index.getStorageSync("yjDate");
const currentDate = this.getCurrentDate();
if (yjDate && currentDate === yjDate.nextPeriod) {
const currentHour = (/* @__PURE__ */ new Date()).getHours();
if (currentHour >= 8) {
common_vendor.index.removeStorageSync("yjDate");
common_vendor.index.showModal({
title: "提醒",
content: "经期时间到了!",
showCancel: false,
success: () => {
}
});
}
}
}, 1e3);
},
onShow: function() {
},
onHide: function() {
console.log("App Hide");
},
methods: {
getCurrentTime() {
const now = /* @__PURE__ */ new Date();
const hours = String(now.getHours()).padStart(2, "0");
const minutes = String(now.getMinutes()).padStart(2, "0");
return `${hours}:${minutes}`;
},
// 获取当前日期,格式为 "YYYY-MM-DD"
getCurrentDate() {
const now = /* @__PURE__ */ new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, "0");
const day = String(now.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
}
}
};
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/health/hyy1/App.vue"]]);
function createApp() {
const app = common_vendor.createSSRApp(App);
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;

@ -0,0 +1,47 @@
{
"pages": [
"pages/welcome/welcome",
"pages/message/message",
"pages/test/test",
"pages/index/index",
"pages/yddk/yddk",
"pages/zxtx/zxtx",
"pages/scgl/scgl",
"pages/jqjl/jqjl",
"pages/yddk/add"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "健康监测",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#333333",
"selectedColor": "#28C76F",
"list": [
{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "static/main(1).png",
"selectedIconPath": "static/main(1).png"
},
{
"text": "我的",
"pagePath": "pages/message/message",
"iconPath": "static/myself(1).png",
"selectedIconPath": "static/myself(1).png"
}
]
},
"permission": {
"scope.userLocation": {
"desc": "运动打卡功能需要定位"
}
},
"requiredPrivateInfos": [
"chooseLocation",
"getLocation"
],
"usingComponents": {}
}

@ -0,0 +1,3 @@
/*每个页面公共css */
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,44 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
title: " "
};
},
onLoad() {
},
methods: {
jumpToCalculationPage1() {
common_vendor.index.navigateTo({
url: "/pages/zxtx/zxtx"
});
},
jumpToCalculationPage2() {
common_vendor.index.navigateTo({
url: "/pages/scgl/scgl"
});
},
jumpToCalculationPage3() {
common_vendor.index.navigateTo({
url: "/pages/yddk/yddk"
});
},
jumpToCalculationPage4() {
common_vendor.index.navigateTo({
url: "/pages/jqjl/jqjl"
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($data.title),
b: common_vendor.o((...args) => $options.jumpToCalculationPage1 && $options.jumpToCalculationPage1(...args)),
c: common_vendor.o((...args) => $options.jumpToCalculationPage2 && $options.jumpToCalculationPage2(...args)),
d: common_vendor.o((...args) => $options.jumpToCalculationPage3 && $options.jumpToCalculationPage3(...args)),
e: common_vendor.o((...args) => $options.jumpToCalculationPage4 && $options.jumpToCalculationPage4(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,5 @@
{
"navigationBarTitleText": "健康监测",
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {}
}

@ -0,0 +1 @@
<view class="content"><view class="text-area"><text class="title">{{a}}</text></view><image class="logo" src="/static/k4.png"></image><button type="primary" class="jump-btn" bindtap="{{b}}">作息提醒</button><button type="primary" class="jump-btn" bindtap="{{c}}">身材管理</button><button type="primary" class="jump-btn" bindtap="{{d}}">运动打卡</button><button type="primary" class="jump-btn" bindtap="{{e}}">经期记录</button></view>

@ -0,0 +1,34 @@
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 500rpx;
width: 800rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.enter {
position: absolute;
top: 800rpx;
left: 320rpx;
}
button {
font-size: 35rpx;
width: 90%;
border-radius: 9999rpx;
margin: 20rpx 0rpx;
}

@ -0,0 +1,87 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
currentDate: "",
// 当前选择的日期
nextPeriod: "",
// 预测的下次经期日期
jqList: []
};
},
onLoad() {
const yjDate = common_vendor.index.getStorageSync("yjDate");
if (yjDate) {
this.currentDate = yjDate.currentDate;
this.predictNextPeriod();
}
const jqList = common_vendor.index.getStorageSync("jqList");
this.jqList = jqList;
},
methods: {
handleDateChange(e) {
this.currentDate = e.detail.value;
this.predictNextPeriod();
},
predictNextPeriod() {
const selectedDate = new Date(this.currentDate);
const nextPeriodDate = new Date(selectedDate.getTime() + 28 * 24 * 60 * 60 * 1e3);
const year = nextPeriodDate.getFullYear();
const month = nextPeriodDate.getMonth() + 1;
const day = nextPeriodDate.getDate();
this.nextPeriod = `${year}-${month < 10 ? "0" + month : month}-${day < 10 ? "0" + day : day}`;
},
setReminder() {
if (this.nextPeriod == "") {
common_vendor.wx$1.showToast({
title: "请选择经期来的日期",
icon: "none",
duration: 2e3
});
return;
}
common_vendor.wx$1.showToast({
title: "提醒设置成功",
icon: "success",
duration: 2e3
});
let jqList = common_vendor.index.getStorageSync("jqList");
if (jqList) {
jqList.push({
currentDate: this.currentDate,
nextPeriod: this.nextPeriod
});
} else {
jqList = [{
currentDate: this.currentDate,
nextPeriod: this.nextPeriod
}];
}
common_vendor.index.setStorageSync("jqList", jqList);
this.jqList = jqList;
common_vendor.index.setStorageSync("yjDate", {
currentDate: this.currentDate,
nextPeriod: this.nextPeriod
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($data.currentDate),
b: common_vendor.o((...args) => $options.handleDateChange && $options.handleDateChange(...args)),
c: common_vendor.t($data.nextPeriod),
d: common_vendor.o((...args) => $options.setReminder && $options.setReminder(...args)),
e: common_vendor.f($data.jqList, (item, index, i0) => {
return {
a: common_vendor.t(index + 1),
b: common_vendor.t(item.currentDate),
c: common_vendor.t(item.nextPeriod),
d: index
};
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/jqjl/jqjl.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "月经记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {}
}

@ -0,0 +1 @@
<view class="container"><view class="title">月经记录</view><view class="date-picker"><text class="label">经期来的日期:</text><picker mode="date" bindchange="{{b}}"><view class="picker">{{a}} <text class="arrow">▼</text></view></picker></view><view class="prediction"><text class="label">预测下次经期:</text><text class="next-period">{{c}}</text></view><button class="btn" bindtap="{{d}}">设置提醒</button><view class="submit-wrap"><view class="submit-title"> 历史设置 </view><view wx:for="{{e}}" wx:for-item="item" wx:key="d" class="submit-item">{{item.a}}. 记录时间:{{item.b}} 预测时间:{{item.c}}</view></view></view>

@ -0,0 +1,80 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
margin: 20px;
}
.title {
font-size: 20px;
margin-bottom: 20px;
}
.date-picker {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.label {
font-size: 16px;
margin-right: 10px;
}
.picker {
display: flex;
align-items: center;
border: 1px solid #ccc;
padding: 5px 10px;
}
.arrow {
margin-left: 5px;
font-size: 12px;
}
.prediction {
font-size: 16px;
margin-bottom: 20px;
}
.btn {
width: 100%;
padding: 10rpx;
font-size: 16px;
border-radius: 5px;
background-color: #007aff;
color: #fff;
text-align: center;
}
.submit-wrap {
width: 100%;
margin: 0px auto;
margin-top: 30rpx;
}
.submit-wrap .submit-title {
color: #007aff;
border-left: 8px solid #007aff;
padding-left: 30rpx;
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.submit-wrap .submit-item {
margin: 15rpx 0rpx;
}

@ -0,0 +1,72 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
isAuthorization: true,
username: "",
password: "",
"message": [],
"base_url": this.$BASE_URL_MEDIA
};
},
methods: {
async user_login() {
await common_vendor.index.request({
url: this.$BASE_URL + "/token-api/token/",
method: "POST",
data: {
"username": this.username,
"password": this.password
},
sucess: async (res) => {
if (res.statusCode !== 200 && res.statusCode !== 201) {
return common_vendor.index.showToast({
title: "请求失败"
});
} else {
this.isAuthorization = false;
console.log(res.data);
common_vendor.index.setStorageSync("Access_token", res.data.access);
const response_message = await this.$myRequest({
url: "/rest-auth/devholder/holddevmessage/",
method: "GET"
});
if (response_message.statusCode === 200) {
console.log(response_message.data);
this.messages = response_message.data;
}
}
},
fail: (err) => {
return common_vendor.index.showToast({
title: "请求接口失败"
});
}
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.username,
b: common_vendor.o(($event) => $data.username = $event.detail.value),
c: $data.password,
d: common_vendor.o(($event) => $data.password = $event.detail.value),
e: common_vendor.o((...args) => $options.user_login && $options.user_login(...args)),
f: $data.isAuthorization,
g: common_vendor.f(_ctx.messages, (item, index, i0) => {
return {
a: $data.base_url + item.holddeviceimg,
b: common_vendor.t(item.message.slice(0, 22)),
c: common_vendor.t(item.holddevice),
d: common_vendor.t(item.datachannel),
e: common_vendor.t(item.timestamp | _ctx.formatDate),
f: index
};
}),
h: !$data.isAuthorization
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/message/message.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,5 @@
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"usingComponents": {}
}

@ -0,0 +1 @@
<view><view class="login" hidden="{{!f}}"><view class="uni-common-mt"><view class="uni-form-item uni-colmn"><view class="login_label">登录</view></view><view class="uni-form-item uni-column"><view><input class="uni-input" focus placeholder="账号" value="{{a}}" bindinput="{{b}}"/></view></view><view class="uni-form-item uni-column"><view><input class="uni-input" hold-keyboard placeholder="密码" password="true" value="{{c}}" bindinput="{{d}}"></input></view></view><view class="uni-form-item uni-column"><view><button type="primary" bindtap="{{e}}">登录</button></view></view></view></view><view class="message" hidden="{{!h}}"><view wx:for="{{g}}" wx:for-item="item" wx:key="f" class="message_item"><image src="{{item.a}}"></image><view class="right"><view class="message_content">{{item.b}}</view><view class="messge_channel"><view><text class="device">{{item.c}}</text> -{{item.d}}</view><view class="info"><text class="timestamp">{{item.e}}</text></view></view></view></view></view></view>

@ -0,0 +1,49 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.login {
padding: 20rpx 40rpx;
margin: 200rpx 20rpx;
text-align: center;
background-color: #eee;
}
.login .login_label {
color: #333333;
margin: 0 auto;
}
.login .uni-input {
background-color: #fff;
height: 80rpx;
text-align: left;
padding-left: 10rpx;
border-radius: 10rpx;
font-size: 30rpx;
}
.login .uni-form-item {
margin: 30rpx 0;
}
.login button {
font-size: 30rpx;
}

@ -0,0 +1,87 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
height: "",
weight: "",
resultVisible: false,
bmi: "",
interpretation: "",
bimList: []
};
},
onLoad() {
const bimList = common_vendor.index.getStorageSync("bimList");
this.bimList = bimList;
},
methods: {
calculateBMI() {
const height = parseFloat(this.height);
const weight = parseFloat(this.weight);
if (isNaN(height) || isNaN(weight)) {
common_vendor.index.showToast({
title: "请填写正确的身高和体重",
icon: "none"
});
return;
}
const bmi = (weight / (height / 100 * (height / 100))).toFixed(1);
let interpretation = "";
if (bmi < 18.5) {
interpretation = "您的体重过轻";
} else if (bmi >= 18.5 && bmi < 24) {
interpretation = "您的体重正常";
} else if (bmi >= 24 && bmi < 28) {
interpretation = "您的体重过重";
} else if (bmi >= 28) {
interpretation = "您的体重肥胖";
}
this.bmi = bmi;
this.interpretation = interpretation;
common_vendor.index.showModal({
content: "您的BMI指数为:" + bmi + " " + interpretation,
success: (res) => {
}
});
let bimList = common_vendor.index.getStorageSync("bimList");
if (bimList) {
bimList.push({
bmi,
interpretation
});
} else {
bimList = [{
bmi,
interpretation
}];
}
common_vendor.index.setStorageSync("bimList", bimList);
this.bimList = bimList;
this.resultVisible = true;
},
jumpToPreviousPage() {
common_vendor.index.navigateBack();
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.height,
b: common_vendor.o(($event) => $data.height = $event.detail.value),
c: $data.weight,
d: common_vendor.o(($event) => $data.weight = $event.detail.value),
e: common_vendor.o((...args) => $options.calculateBMI && $options.calculateBMI(...args)),
f: common_vendor.o((...args) => $options.jumpToPreviousPage && $options.jumpToPreviousPage(...args)),
g: common_vendor.f($data.bimList, (item, index, i0) => {
return {
a: common_vendor.t(index + 1),
b: common_vendor.t(item.bmi),
c: common_vendor.t(item.interpretation),
d: index
};
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/scgl/scgl.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "身材管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {}
}

@ -0,0 +1 @@
<view class="container"><view class="title">BMI计算器</view><view class="input-wrapper"><text class="label">身高(cm)</text><input placeholder="请输入身高" class="input" type="number" value="{{a}}" bindinput="{{b}}"/></view><view class="input-wrapper"><text class="label">体重(kg)</text><input placeholder="请输入体重" class="input" type="number" value="{{c}}" bindinput="{{d}}"/></view><button class="calculate-btn" bindtap="{{e}}">计算BMI</button><button class="jump-btn" bindtap="{{f}}">返回上一页</button><view class="submit-wrap"><view class="submit-title"> 查询记录 </view><view wx:for="{{g}}" wx:for-item="item" wx:key="d" class="submit-item">{{item.a}}. BMI指数:{{item.b}} {{item.c}}</view></view></view>

@ -0,0 +1,91 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 30px;
}
.title {
font-size: 20px;
font-weight: bold;
margin-bottom: 20px;
}
.input-wrapper {
display: flex;
align-items: center;
margin-bottom: 20px;
width: 90%;
}
.label {
width: 80px;
}
.input {
flex: 1;
border-bottom: 1px solid #eee;
}
.calculate-btn {
height: 50px;
background-color: #1aad19;
color: #fff;
border-radius: 20px;
text-align: center;
line-height: 50px;
margin-bottom: 20px;
width: 90%;
border-radius: 9999px;
}
.result {
margin-top: 10px;
}
.bmi {
font-weight: bold;
}
.jump-btn {
height: 50px;
line-height: 50px;
background-color: #007aff;
width: 90%;
color: #fff;
border-radius: 9999px;
text-align: center;
}
.submit-wrap {
width: 90%;
margin: 0px auto;
margin-top: 30rpx;
}
.submit-wrap .submit-title {
color: #1aad19;
border-left: 8px solid #1aad19;
padding-left: 30rpx;
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.submit-wrap .submit-item {
margin: 15rpx 0rpx;
}

@ -0,0 +1,13 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
methods: {}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/test/test.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,5 @@
{
"navigationBarTitleText": "健康监测",
"enablePullDownRefresh": false,
"usingComponents": {}
}

@ -0,0 +1 @@
<view> hello,iotui </view>

@ -0,0 +1,13 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
methods: {}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/welcome/welcome.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,5 @@
{
"navigationBarTitleText": "健康监测",
"enablePullDownRefresh": false,
"usingComponents": {}
}

@ -0,0 +1 @@
<view><swiper class="swiper" circular indicator-dots="true" autoplay="true" interval="2000" duration="500"><swiper-item class="swiper-item"><image src="/static/k2.png"></image></swiper-item><swiper-item class="swiper-item"><image src="/static/k1.png"></image></swiper-item></swiper><view class="enter"><navigator url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"><button type="primary" size="mini">进入首页</button></navigator></view></view>

@ -0,0 +1,41 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.swiper {
height: 100vh;
}
.swiper-item {
text_align: center;
height: 100%;
}
.swiper-item image {
width: 100%;
height: 100%;
}
.enter {
position: absolute;
top: 800rpx;
left: 320rpx;
}

@ -0,0 +1,92 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
submit: {
date: "",
address: "点击选择位置",
photoUrl: ""
}
};
},
onLoad() {
this.submit.date = this.getCurrentDateTime();
},
methods: {
handleAddress() {
common_vendor.index.getLocation({
success: (res) => {
common_vendor.wx$1.chooseLocation({
latitude: res.latitude,
longitude: res.longitude,
success: (res2) => {
this.submit.address = res2.address;
}
});
}
});
},
chooseImage() {
if (this.submit.address == "" || this.submit.address == "点击选择位置") {
common_vendor.index.showToast({
icon: "none",
title: "请选择位置"
});
return;
}
common_vendor.index.chooseImage({
count: 1,
success: (res) => {
const tempFilePath = res.tempFilePaths[0];
this.uploadImage(tempFilePath);
}
});
},
getCurrentDateTime() {
const now = /* @__PURE__ */ new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, "0");
const day = String(now.getDate()).padStart(2, "0");
const hours = String(now.getHours()).padStart(2, "0");
const minutes = String(now.getMinutes()).padStart(2, "0");
return `${year}-${month}-${day} ${hours}:${minutes}`;
},
uploadImage(filePath) {
common_vendor.index.showLoading({
title: "上传中"
});
setTimeout(() => {
common_vendor.index.hideLoading();
this.submit.photoUrl = filePath;
common_vendor.index.showToast({
title: "打卡成功",
icon: "success"
});
let signList = common_vendor.index.getStorageSync("signList");
if (signList) {
signList.push(this.submit);
} else {
signList = [this.submit];
}
common_vendor.index.setStorageSync("signList", signList);
}, 2e3);
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($data.submit.date),
b: common_vendor.t($data.submit.address),
c: common_vendor.o((...args) => $options.handleAddress && $options.handleAddress(...args)),
d: $data.submit.photoUrl
}, $data.submit.photoUrl ? {
e: $data.submit.photoUrl
} : {}, {
f: !$data.submit.photoUrl
}, !$data.submit.photoUrl ? {
g: common_vendor.o(($event) => $options.chooseImage())
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/yddk/add.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "打卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {}
}

@ -0,0 +1 @@
<view class="container"><view class="photo-card"><view class="card-header"><view><label>打卡时间:</label><label>{{a}}</label></view><view><label>打卡位置:</label><label bindtap="{{c}}">{{b}}</label></view></view><view class="card-body"><image wx:if="{{d}}" mode="scaleToFill" class="photo" src="{{e}}"></image><button wx:if="{{f}}" class="upload-btn" bindtap="{{g}}">上传图片打卡</button></view></view></view>

@ -0,0 +1,68 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
padding: 20px;
}
.photo-card {
margin-bottom: 20px;
background-color: #f1f1f1;
border-radius: 8px;
overflow: hidden;
}
.card-header {
display: flex;
flex-direction: column;
padding: 10px;
background-color: #f1f1f1;
}
.card-header view {
display: flex;
justify-content: space-between;
margin: 10rpx 0rpx;
}
.date {
font-size: 16px;
font-weight: bold;
}
.status {
color: #999;
}
.card-body {
padding: 10px;
text-align: center;
}
.photo {
width: 100%;
height: 200px;
object-fit: cover;
}
.upload-btn {
margin-top: 10px;
padding: 0px 16px;
background-color: #4b7fff;
color: #fff;
border-radius: 4px;
}

@ -0,0 +1,40 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
photoCards: []
};
},
onShow() {
let signList = common_vendor.index.getStorageSync("signList");
if (signList) {
this.photoCards = signList;
}
},
methods: {
handleAdd() {
common_vendor.index.navigateTo({
url: "/pages/yddk/add"
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.photoCards.length
}, $data.photoCards.length ? {
b: common_vendor.f($data.photoCards, (card, k0, i0) => {
return {
a: common_vendor.t(card.date),
b: common_vendor.t(card.address),
c: card.photoUrl,
d: card.date
};
})
} : {}, {
c: common_vendor.o((...args) => $options.handleAdd && $options.handleAdd(...args))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/yddk/yddk.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "运动打卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {}
}

@ -0,0 +1 @@
<view class="container"><view wx:if="{{a}}"><view wx:for="{{b}}" wx:for-item="card" wx:key="d" class="photo-card"><view class="card-header"><view><label>打卡时间:</label><label>{{card.a}}</label></view><view><label>打卡位置:</label><label>{{card.b}}</label></view></view><view class="card-body"><image class="photo" src="{{card.c}}"></image></view></view></view><view wx:else class="sign-empty"> - 暂无打卡记录 - </view><view class="add" bindtap="{{c}}"> 打卡 </view></view>

@ -0,0 +1,83 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
padding: 20px;
}
.photo-card {
margin-bottom: 20px;
background-color: #f1f1f1;
border-radius: 8px;
overflow: hidden;
}
.card-header {
display: flex;
flex-direction: column;
padding: 10px;
background-color: #f1f1f1;
}
.card-header view {
display: flex;
justify-content: space-between;
margin: 10rpx 0rpx;
}
.date {
font-size: 16px;
font-weight: bold;
}
.status {
color: #999;
}
.card-body {
padding: 10px;
text-align: center;
}
.photo {
width: 100%;
height: 200px;
object-fit: cover;
}
.upload-btn {
margin-top: 10px;
padding: 8px 16px;
background-color: #4b7fff;
color: #fff;
border-radius: 4px;
}
.add {
position: fixed;
right: 50rpx;
bottom: 100rpx;
background: #4b7fff;
color: #fff;
font-size: 32rpx;
padding: 40rpx 30rpx;
border-radius: 999rpx;
}
.sign-empty {
text-align: center;
padding: 30rpx 0rpx;
color: gray;
}

@ -0,0 +1,61 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
sleepTime: "请选择睡眠时间",
exerciseTime: "请选择运动时间"
};
},
onLoad() {
const remindTime = common_vendor.index.getStorageSync("remindTime");
console.log(remindTime);
if (remindTime) {
this.sleepTime = remindTime.sleepTime;
this.exerciseTime = remindTime.exerciseTime;
}
},
methods: {
bindSleepTimeChange(e) {
this.sleepTime = e.detail.value;
},
bindExerciseTimeChange(e) {
this.exerciseTime = e.detail.value;
},
setReminders() {
if (this.sleepTime == "请选择睡眠时间") {
common_vendor.index.showToast({
icon: "none",
title: "请选择睡眠时间"
});
return;
}
if (this.exerciseTime == "请选择运动时间") {
common_vendor.index.showToast({
icon: "none",
title: "请选择运动时间"
});
return;
}
common_vendor.index.setStorageSync("remindTime", {
sleepTime: this.sleepTime,
exerciseTime: this.exerciseTime
});
common_vendor.index.showToast({
icon: "none",
title: "设置提醒成功!"
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($data.sleepTime),
b: common_vendor.o((...args) => $options.bindSleepTimeChange && $options.bindSleepTimeChange(...args)),
c: common_vendor.t($data.exerciseTime),
d: common_vendor.o((...args) => $options.bindExerciseTimeChange && $options.bindExerciseTimeChange(...args)),
e: common_vendor.o((...args) => $options.setReminders && $options.setReminders(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/health/hyy1/pages/zxtx/zxtx.vue"]]);
wx.createPage(MiniProgramPage);

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "作息提醒",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {}
}

@ -0,0 +1 @@
<view class="container"><view><swiper class="swiper" circular indicator-dots="true" autoplay="true" interval="3000" duration="500"><swiper-item class="swiper-item"><image src="/static/k5(1)(1).png"></image></swiper-item><swiper-item class="swiper-item"><image src="/static/k6(1)(1).png"></image></swiper-item></swiper></view><view class="section"><text>选择睡眠时间:</text><picker mode="time" bindchange="{{b}}"><view class="picker">{{a}}</view></picker></view><view class="section"><text>选择运动时间:</text><picker mode="time" bindchange="{{d}}"><view class="picker">{{c}}</view></picker></view><button bindtap="{{e}}" class="btn">设置提醒</button></view>

@ -0,0 +1,62 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.section {
margin: 30rpx 0rpx;
width: 90%;
}
.picker {
margin-top: 20rpx;
border: 1px solid #55aaff;
border-radius: 15rpx;
padding: 20rpx 20rpx;
height: 40rpx;
width: 90%;
text-align: center;
}
.btn {
background-color: #55aaff;
color: #f8feff;
padding: 0rpx 20px;
width: 90%;
border-radius: 5px;
}
.swiper {
height: 200px;
width: 100vw;
}
.swiper-item {
text_align: center;
width: 100%;
}
.swiper-item image {
width: 100%;
}

@ -0,0 +1,46 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "",
"appid": "wx7fd4c57dfed68264",
"projectname": "hyy",
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

@ -0,0 +1,63 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "hyy",
"setting": {
"compileHotReLoad": true
},
"libVersion": "2.25.4",
"condition": {
"miniprogram": {
"list": [
{
"name": "",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/zxtx/zxtx",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/scgl/scgl",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/yddk/yddk",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/yddk/add",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/jqjl/jqjl",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save