Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
6f23f726d8 | 2 years ago |
|
Before Width: | Height: | Size: 110 KiB |
@ -1,30 +0,0 @@
|
|||||||
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
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
@ -1,88 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,126 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
hello,iotui
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
<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>
|
|
||||||
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 427 KiB |
|
Before Width: | Height: | Size: 427 KiB |
|
Before Width: | Height: | Size: 414 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 40 KiB |
@ -1,10 +0,0 @@
|
|||||||
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]));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "uni-config-center",
|
|
||||||
"version": "0.0.3",
|
|
||||||
"description": "配置中心",
|
|
||||||
"main": "index.js",
|
|
||||||
"keywords": [],
|
|
||||||
"author": "DCloud",
|
|
||||||
"license": "Apache-2.0"
|
|
||||||
}
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
# uni-id-common
|
|
||||||
|
|
||||||
文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"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",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,89 +0,0 @@
|
|||||||
"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;
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"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": {}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
/*每个页面公共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;}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "健康监测",
|
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "月经记录",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "身材管理",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "健康监测",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<view> hello,iotui </view>
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "健康监测",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "打卡",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "运动打卡",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
"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);
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "作息提醒",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 107 KiB |