diff --git a/apis/interfaces/drink.js b/apis/interfaces/drink.js
index 4d2128a..eacae00 100644
--- a/apis/interfaces/drink.js
+++ b/apis/interfaces/drink.js
@@ -35,8 +35,21 @@ const drinkWater = () => {
method: 'POST',
})
}
+/**
+ * @description:删除喝水记录
+ * @Date: 2022-01-20 15点08分
+ */
+const delDrinkWater = (id) => {
+ return request({
+ url: `health/waters/${id}`,
+ method: 'DELETE',
+ })
+}
+
+
export {
waters,
setWaters,
- drinkWater
+ drinkWater,
+ delDrinkWater
}
diff --git a/components/sports/addPopup.vue b/components/sports/addPopup.vue
index e9649a9..c0ce236 100644
--- a/components/sports/addPopup.vue
+++ b/components/sports/addPopup.vue
@@ -37,7 +37,7 @@
v-if="selectSports.title === '编辑运动'"
name="trash"
color="#ddd"
- size="20"
+ size="16"
label="删除这条数据"
labelColor="#ddd"
:bold="true"
@@ -49,6 +49,7 @@
placeholder="60"
class="select-time"
v-model="duration"
+ type="number"
>
diff --git a/pages/record/addExercises.vue b/pages/record/addExercises.vue
index b86878c..8390a35 100644
--- a/pages/record/addExercises.vue
+++ b/pages/record/addExercises.vue
@@ -7,177 +7,164 @@
-->
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/pages/record/drink.vue b/pages/record/drink.vue
index 51ff8e4..9bfd096 100644
--- a/pages/record/drink.vue
+++ b/pages/record/drink.vue
@@ -7,446 +7,402 @@
-->
-
-
-
- 再喝{{water.lack.cup}}杯(约{{water.lack.value}}ml)
- 已喝{{water.total}}ml
-
-
-
-
-
-
-
-
-
-
- 今日目标
-
-
- 水杯容量
-
-
-
-
-
-
-
-
-
-
-
- 一杯水
-
-
-
-
-
- 喝水记录
-
-
-
-
-
-
- 水{{item.time}}
- {{item.ml}}ml
-
-
-
- 今天一杯水还没有喝呢,来一杯吧~
-
-
+
+
+
+
+ 再喝
+ {{ water.lack.cup }}
+ 杯
+ (约{{ water.lack.value }}ml)
+
+
+ 已喝
+ {{ water.total }}ml
+
+
+
+
+
+
+
+
+
+
+ 今日目标
+
+
+
+ 水杯容量
+
+
+
+
+
+
+
+
+
+
+
+ 一杯水
+
+
+
+
+
+ 喝水记录
+
+
+
+
+
+ 水
+ {{ item.time }}
+
+ {{ item.ml }}ml
+
+
+
+ 今天一杯水还没有喝呢,来一杯吧~
+
+
\ No newline at end of file
+
diff --git a/pages/record/foods.vue b/pages/record/foods.vue
index 94bc280..8b1f581 100644
--- a/pages/record/foods.vue
+++ b/pages/record/foods.vue
@@ -7,530 +7,446 @@
-->
-
-
-
-
- 饮食摄入
- {{ calorys.intake_total }}
-
-
- {{ calorys.exceeds ? '多吃了' : '还可以吃' }}
- {{ calorys.amount }}
- 推荐预算{{ calorys.goal }}
-
-
- 运动消耗
- {{ calorys.exercise_total }}
-
- 摄入量推荐
-
-
+
+
+
+
+ 饮食摄入
+ {{ calorys.intake_total }}
+
+
+ {{ calorys.exceeds ? '多吃了' : '还可以吃' }}
+ {{ calorys.amount }}
+ 推荐预算{{ calorys.goal }}
+
+
+ 运动消耗
+ {{ calorys.exercise_total }}
+
+ 摄入量推荐
+
+
-
-
-
-
-
- {{ it.name }}
- {{ it.remark || '' }}
-
-
- {{ it.total }}
- 千卡
-
-
-
-
-
-
-
-
-
- 运动
-
- {{ sportsTotal }}
- 千卡
-
-
-
+
+
+
+
+
+ {{ it.name }}
+ {{ it.remark || '' }}
+
+
+ {{ it.total }}
+ 千卡
+
+
+
+
+
+
+
+
+
+ 运动
+
+ {{ sportsTotal }}
+ 千卡
+
+
+
-
-
+
+
-
-
-
- 还没有添加今日饮食记录
- 请点击屏幕下方按钮来添加
-
+
+
+
+ 还没有添加今日饮食记录
+ 请点击屏幕下方按钮来添加
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/uni_modules/onemue-USQLite/js_sdk/usqlite.js b/uni_modules/onemue-USQLite/js_sdk/usqlite.js
index 1c6877d..b71a836 100644
--- a/uni_modules/onemue-USQLite/js_sdk/usqlite.js
+++ b/uni_modules/onemue-USQLite/js_sdk/usqlite.js
@@ -2,7 +2,7 @@
* 对 SQLite 的 ORM 的封装处理
* @time 2021-12-30 11:00:00
* @version 2.0.0
- *
+ *
* @by onemue
*/
@@ -38,9 +38,9 @@ class Utils {
}
}
Utils.log(primaryKeyArr.length);
- if (primaryKeyArr.length >= 1) {
+ if (primaryKeyArr.length>=1) {
sql = `CREATE TABLE '${name}' (${sqlArr.join(', ')}, PRIMARY KEY (${primaryKeyArr.join()}))`;
- } else {
+ }else{
sql = `CREATE TABLE '${name}' (${sqlArr.join(', ')})`;
}
Utils.log(`modelSql :${sql}`);
@@ -119,7 +119,7 @@ class Model {
* @constructor
* @param {String} name 数据库表名
* @param {Object} options 数据表列对象
- * @returns
+ * @returns
*/
constructor(name, options) {
let self = this;
@@ -135,11 +135,11 @@ class Model {
/**
* @description 查询表数据
- * @param {String|Array} options
+ * @param {String|Array} options
* - String WHERE 内容
* - Array 需要查询的列
- * @param {*} callback
- * @returns
+ * @param {*} callback
+ * @returns
*/
find(options, callback) {
let sql = '';
@@ -173,7 +173,7 @@ class Model {
/**
* @description 分页查询
* @param {Object} options : { where:查询条件, number: 当前页数 , count : 每页数量 }
- * @param {Function} callback :(err,results)=>{}
+ * @param {Function} callback :(err,results)=>{}
* @return
*/
limit(options, callback) {
@@ -223,7 +223,7 @@ class Model {
} else if (options.constructor == Object) {
let keys = [];
let values = [];
- let index = arguments[3] ?? null;
+ let index = arguments[3]??null;
for (var key in options) {
keys.push(key);
values.push(`'${options[key]}'`);
@@ -236,13 +236,13 @@ class Model {
name: config.name,
sql: sql,
success(e) {
- if (index) {
+ if(index){
callback(null, e, options, index);
}
callback(null, e, options);
},
fail(e) {
- if (index) {
+ if(index){
callback(e, null, options, index);
}
callback(e, null, options);
@@ -256,7 +256,7 @@ class Model {
/**
* @description 更新数据
* @param {Object} options:可选参数 更新条件
- * @param {Object} obj: 修改后的数据
+ * @param {Object} obj: 修改后的数据
* @param {Function} callback :(err,results)=>{}
*/
update(options, obj, callback) {
@@ -332,7 +332,7 @@ class Model {
* @description 重命名或者新增列
* @param {Object} options 参数 数组为新增多列 对象为新增单列{aa} 字符串重命名
* @param {Function} callback :(err,results)=>{}
- * @return:
+ * @return:
*/
alter(options, callback) {
let self = this;
@@ -366,11 +366,11 @@ class Model {
return this;
}
/**
- * @description
+ * @description
* @param {Model} model 右 Model
- * @param {Object} options
- * @param {Function} callback
- * @returns
+ * @param {Object} options
+ * @param {Function} callback
+ * @returns
*/
join(model, options, callback) {
if (!model) {
@@ -445,8 +445,8 @@ class Model {
}
/**
- * @description 判断是否存在
- * @param {Function} callback
+ * @description 判断是否存在
+ * @param {Function} callback
*/
isExist(callback) {
let sql = `SELECT count(*) AS isExist FROM sqlite_master WHERE type='table' AND name='${this.name}'`;
@@ -467,7 +467,7 @@ class Model {
}
/**
* @description 删除数据表 **不推荐**
- * @param {Function} callback
+ * @param {Function} callback
*/
drop(callback) {
var sql = `DROP TABLE '${this.name}'`;
@@ -490,7 +490,7 @@ class Model {
/**
* @description 创建数据表 **不推荐**
- * @param {Function} callback
+ * @param {Function} callback
*/
create(callback) {
let self = this;
@@ -528,7 +528,7 @@ class Model {
});
}
// TODO 更新表结构
- // TODO 数据表备份??
+ // TODO 数据表备份??
// TODO 多表联查
// TODO 下班了其他的想不起来 回头再说
}
@@ -542,7 +542,7 @@ export class usqlite {
* {name: 'demo', path: '_doc/demo.db'}
* - name 数据库名称*
* - path 数据库路径
- * @param {Function} callback
+ * @param {Function} callback
*/
constructor(options, callback) {
console.warn('No instantiation');
@@ -553,7 +553,7 @@ export class usqlite {
* {name: 'demo', path: '_doc/demo.db'}
* - name 数据库名称*
* - path 数据库路径
- * @param {Function} callback
+ * @param {Function} callback
*/
static connect(options, callback) {
config.name = options.name; // 数据库名称*
@@ -576,7 +576,7 @@ export class usqlite {
}
/**
* @description 断开数据库
- * @param {*} callback
+ * @param {*} callback
*/
static close(callback) {
plus.sqlite.closeDatabase({