Parcourir la source

运动卡路里区分男女计算结果

Changpeng Duan il y a 5 ans
Parent
commit
f7d989de2a

BIN
genkey/developing/devcer.p12


BIN
genkey/developing/ios_development.cer


BIN
genkey/developing/xfeilong.mobileprovision


+ 6 - 1
hbuild/online/manifest.json

@@ -48,7 +48,12 @@
                 "p12" : "", /*iOS应用打包个人证书,打包配置文件关联的个人证书*/
                 "devices" : "universal", /*iOS应用支持的设备类型,可取值iphone/ipad/universal*/
                 "frameworks" : [],
-                "idfa" : false
+                "idfa" : false,
+                "privacyDescription" : {
+                    "NSBluetoothPeripheralUsageDescription" : "允许 “小飞龙” 在您使用本应用时访问您设备的蓝牙权限",
+                    "NSBluetoothAlwaysUsageDescription" : "允许 “小飞龙” 在您使用本应用时访问您设备的蓝牙权限",
+                    "NSLocationWhenInUseUsageDescription" : "允许 “小飞龙” 在您使用本应用时访问您设备的位置权限"
+                }
             },
             "google" : {
                 "packagename" : "", /*Android应用包名,如io.dcloud.HelloH5*/

+ 13 - 1
online/src/page/mainpage.vue

@@ -781,7 +781,19 @@ export default {
         // 计算运动卡路里
         calcSportCal(calorieNoVo2) {
             let that = this;
-            let bmrMSjDaily = (10.00 * this.weight) + (6.25 * this.height) - (5.00 * this.age) + 5.00;
+            let bmrMSjDaily = 0;
+            // 男
+            if (that.sex == 1) {
+                bmrMSjDaily = (10.00 * this.weight) + (6.25 * this.height) - (5.00 * this.age) + 5.00;
+            } else {
+                // 女
+                bmrMSjDaily = (10.00 * this.weight) + (6.25 * this.height) - (5.00 * this.age) - 161
+            }
+            // 不为负值
+            if (bmrMSjDaily < 0) {
+                bmrMSjDaily = 0;
+            }
+
             let BmrMSjRmrcb = parseFloat((bmrMSjDaily * 1.1) / 24);
             let calorieNoVo2Pure = (calorieNoVo2 - BmrMSjRmrcb / 3600 * 1);
 

+ 50 - 143
pc/src/views/courseEdit.vue

@@ -13,18 +13,11 @@
           <el-row :gutter="20">
             <el-col :span="4">
               <em>会员名:</em>
-              <el-input
-                v-model="panel.name"
-                placeholder="请输入会员名"
-              ></el-input>
+              <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
             </el-col>
             <el-col :span="4">
               <em>手机号:</em>
-              <el-input
-                v-model="panel.phone"
-                placeholder="请输入手机号"
-                type="number"
-              ></el-input>
+              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
             </el-col>
             <el-col :span="4">
               <el-button
@@ -34,8 +27,7 @@
                 plain
                 :disabled="serachBtnStatus"
                 :loading="serachBtnStatus"
-                >查询</el-button
-              >
+              >查询</el-button>
             </el-col>
           </el-row>
         </div>
@@ -47,21 +39,12 @@
           :disabled="BeginState"
           :loading="BeginState"
           v-if="FinishClass == 3"
-          >确认上课</el-button
-        >
-        <el-button @click="confirmClose" type="danger" :disabled="!BeginState"
-          >关闭课程</el-button
-        >
-        <el-button @click="addFinish" type="primary" v-if="FinishClass == 2"
-          >确认下课</el-button
-        >
+        >确认上课</el-button>
+        <el-button @click="confirmClose" type="danger" :disabled="!BeginState">关闭课程</el-button>
+        <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
         <el-button @click="addFinishMember">添加上课会员</el-button>
-        <el-button @click="addTempMember" type="warning"
-          >添加临时会员</el-button
-        >
-        <el-button @click="addCrossMember" type="primary"
-          >添加跨店会员</el-button
-        >
+        <el-button @click="addTempMember" type="warning">添加临时会员</el-button>
+        <el-button @click="addCrossMember" type="primary">添加跨店会员</el-button>
         <!--<el-button @click="allSetOnline" type="warning">全部网课</el-button>-->
       </div>
     </div>
@@ -78,19 +61,8 @@
         ref="multipleTable"
       >
         >
-        <el-table-column
-          type="index"
-          label="排名"
-          align="center"
-          width="50"
-        ></el-table-column>
-        <el-table-column
-          prop="head"
-          label="头像"
-          width="75"
-          align="center"
-          sortable
-        >
+        <el-table-column type="index" label="排名" align="center" width="50"></el-table-column>
+        <el-table-column prop="head" label="头像" width="75" align="center" sortable>
           <template slot-scope="scope">
             <div class="demo-image__preview" v-if="scope.row.Head">
               <el-image
@@ -99,50 +71,25 @@
                 :preview-src-list="[scope.row.Head]"
               ></el-image>
             </div>
-            <img
-              src="../assets/img/nav/head.png"
-              alt
-              v-else
-              width="25px"
-              height="25px"
-            />
+            <img src="../assets/img/nav/head.png" alt v-else width="25px" height="25px" />
             <!--<img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">-->
             <!--<img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>-->
           </template>
         </el-table-column>
-        <el-table-column
-          prop="Name"
-          label="会员名"
-          width="90"
-          sortable
-        ></el-table-column>
-        <el-table-column
-          prop="Phone"
-          label="手机号"
-          width="120"
-          sortable
-        ></el-table-column>
+        <el-table-column prop="Name" label="会员名" width="90" sortable></el-table-column>
+        <el-table-column prop="Phone" label="手机号" width="120" sortable></el-table-column>
         <el-table-column prop="ClassName" label="课程" width="110" sortable>
           <template slot-scope="scope">
             <span
               class="lessons"
               :style="{ background: scope.row.ClassColor }"
-              >{{ scope.row.ClassName }}</span
-            >
+            >{{ scope.row.ClassName }}</span>
           </template>
         </el-table-column>
-        <el-table-column
-          prop="OrderTime"
-          label="预约时间"
-          :formatter="filterFmtDate"
-          sortable
-        ></el-table-column>
-         <el-table-column prop="IsOnline" label="是否网课" width="140">
+        <el-table-column prop="OrderTime" label="预约时间" :formatter="filterFmtDate" sortable></el-table-column>
+        <el-table-column prop="IsOnline" label="是否网课" width="140">
           <template slot="header" slot-scope="scope">
-            <el-checkbox
-              @change="(val) => handleSelectAll(val)"
-              label="是否网课"
-            />
+            <el-checkbox @change="(val) => handleSelectAll(val)" label="是否网课" />
           </template>
           <template slot-scope="scope">
             <el-checkbox
@@ -157,19 +104,8 @@
             ></el-checkbox>
           </template>
         </el-table-column>
-        <el-table-column
-          prop="RemainTotalhour"
-          label="剩余课时"
-          width="110"
-          sortable
-        ></el-table-column>
-        <el-table-column
-          prop="group_no"
-          label="队伍"
-          width="140"
-          v-if="ClassType == 2"
-          sortable
-        >
+        <el-table-column prop="RemainTotalhour" label="剩余课时" width="110" sortable></el-table-column>
+        <el-table-column prop="group_no" label="队伍" width="140" v-if="ClassType == 2" sortable>
           <template slot-scope="scope">
             <!--正式会员-->
             <div v-if="scope.row.IsTmpUser != 1">
@@ -226,8 +162,7 @@
                   <span
                     v-if="item.HrType == 1"
                     style="background: #409eff; color: #fff"
-                    >{{ item.label }}</span
-                  >
+                  >{{ item.label }}</span>
                   <!--共有的-->
                   <span v-else>{{ item.label }}</span>
                 </el-option>
@@ -282,7 +217,7 @@
             <span v-if="scope.row.Status == 3">上课未预约</span>
           </template>
         </el-table-column>
-       
+
         <el-table-column prop="Status" label="操作">
           <template slot-scope="scope">
             <div v-if="scope.row.DpId <= 0">
@@ -292,24 +227,21 @@
                 v-if="scope.row.Status == 1"
                 size="mini"
                 @click="pauseRow(scope.row, 2)"
-                >预约未到</el-button
-              >
+              >预约未到</el-button>
               <el-button
                 type="warning"
                 round
                 v-if="scope.row.Status == 2"
                 size="mini"
                 @click="pauseRow(scope.row, 1)"
-                >上课</el-button
-              >
+              >上课</el-button>
               <el-button
                 type="danger"
                 round
                 v-if="scope.row.Status == 3"
                 size="mini"
                 @click="getClassOverDetailDel(scope.row)"
-                >删除</el-button
-              >&nbsp;
+              >删除</el-button>&nbsp;
               <em v-if="FinishClass != 3">
                 <el-button
                   type="warning"
@@ -321,10 +253,9 @@
                   size="mini"
                   :disabled="scope.row.BindId == 0 && scope.row.IsOnline == 0"
                   @click="getClassDetailAndSnAdd(scope.row)"
-                  >提交</el-button
-                >
+                >提交</el-button>
               </em>
-                <!-- :disabled="scope.row.HrSubmitFlag == 0 && scope.row.IsOnline == 0" -->
+              <!-- :disabled="scope.row.HrSubmitFlag == 0 && scope.row.IsOnline == 0" -->
             </div>
             <div v-if="scope.row.IsTmpUser == 1">
               <el-button
@@ -333,8 +264,7 @@
                 v-if="scope.row.Status == 3 && scope.row.HrSubmitFlag != 1"
                 size="mini"
                 @click="getClassOverTempDel(scope.row)"
-                >删除</el-button
-              >&nbsp;
+              >删除</el-button>&nbsp;
               <span v-if="FinishClass != 3 && scope.row.IsTmpUser == 1">
                 <el-button
                   type="warning"
@@ -344,10 +274,9 @@
                     (scope.row.Status == 3 && FinishClass == 2)
                   "
                   size="mini"
-                   :disabled="scope.row.Sn == '' && scope.row.IsOnline == 0"
+                  :disabled="scope.row.Sn == '' && scope.row.IsOnline == 0"
                   @click="getClassDetailAndSnAdd(scope.row)"
-                  >提交</el-button
-                >
+                >提交</el-button>
               </span>
             </div>
           </template>
@@ -381,17 +310,12 @@
           :disabled="BtnConfirmMember"
           :loading="BtnConfirmMember"
           @click="confirmMember"
-          >确定</el-button
-        >
+        >确定</el-button>
         <el-button size="small" @click="dialogVisible = false">取消</el-button>
       </div>
     </el-dialog>
     <!--添加临时会员-->
-    <el-dialog
-      title="添加临时会员"
-      :visible.sync="dialogTempVisible"
-      width="720px"
-    >
+    <el-dialog title="添加临时会员" :visible.sync="dialogTempVisible" width="720px">
       <div class="dialogContent viplist">
         <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
         <div>
@@ -410,19 +334,12 @@
           :disabled="BtnTempConfirmMember"
           :loading="BtnTempConfirmMember"
           @click="TempconfirmMember"
-          >确定</el-button
-        >
-        <el-button size="small" @click="dialogTempVisible = false"
-          >取消</el-button
-        >
+        >确定</el-button>
+        <el-button size="small" @click="dialogTempVisible = false">取消</el-button>
       </div>
     </el-dialog>
     <!--添加跨店会员-->
-    <el-dialog
-      title="添加跨店会员"
-      :visible.sync="dialogAcrossVisible"
-      width="720px"
-    >
+    <el-dialog title="添加跨店会员" :visible.sync="dialogAcrossVisible" width="720px">
       <div class="dialogContent viplist">
         <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
         <div>
@@ -441,18 +358,11 @@
           :disabled="BtnAcrossConfirmMember"
           :loading="BtnAcrossConfirmMember"
           @click="AcrossConfirmMember"
-          >确定</el-button
-        >
-        <el-button size="small" @click="dialogAcrossVisible = false"
-          >取消</el-button
-        >
+        >确定</el-button>
+        <el-button size="small" @click="dialogAcrossVisible = false">取消</el-button>
       </div>
     </el-dialog>
-    <el-dialog
-      title="确认下课"
-      :visible.sync="dialogFinishVisible"
-      width="650px"
-    >
+    <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
       <div class="dialogContent">
         <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
         <div>
@@ -473,11 +383,8 @@
           :disabled="BtnConfirmClassFinish"
           :loading="BtnConfirmClassFinish"
           @click="confirmClassFinish"
-          >确定</el-button
-        >
-        <el-button size="small" @click="dialogFinishVisible = false"
-          >取消</el-button
-        >
+        >确定</el-button>
+        <el-button size="small" @click="dialogFinishVisible = false">取消</el-button>
       </div>
     </el-dialog>
   </div>
@@ -1088,7 +995,7 @@ export default {
       // 遍历已添加的上课会员,回填穿梭框
       let std = [];
       if (this.tableData) {
-        this.tableData.map(function (item) {
+        this.tableData.map(function(item) {
           if (item.IsTmpUser != 1) {
             std.push(item.UserId);
           }
@@ -1142,7 +1049,7 @@ export default {
       this.dialogTempValue = [];
       let std = [];
       if (this.tableData) {
-        this.tableData.map(function (item) {
+        this.tableData.map(function(item) {
           if (item.IsTmpUser == 1) {
             std.push(item.UserId);
           }
@@ -1159,7 +1066,7 @@ export default {
       this.dialogAcrossValue = [];
       let std = [];
       if (this.tableData) {
-        this.tableData.map(function (item) {
+        this.tableData.map(function(item) {
           std.push(item.UserId);
         });
       }
@@ -1431,7 +1338,7 @@ export default {
             // 没人不允许开课
             if (json.Rs.length > 0) {
               // 全部预约 都是未到也不允许开课
-              json.Rs.map(function (item) {
+              json.Rs.map(function(item) {
                 // 只要有一个不是就放开
                 if (item.Status != 2) {
                   that.BeginState = false;
@@ -1446,13 +1353,13 @@ export default {
               if (that.ClassType == 2) {
                 that.TurnUnit(json.Rs);
               } else {
-                json.Rs.map(function (item) {
+                json.Rs.map(function(item) {
                   item.group_no = item.GroupNo;
                 });
               }
             } else {
               // 已上课的状态
-              json.Rs.map(function (item, i) {
+              json.Rs.map(function(item, i) {
                 if (that.ClassType == 2) {
                   if (item.GroupNo == 0) {
                     item.group_no = (i % that.PkNum) + 1;
@@ -1482,14 +1389,14 @@ export default {
       let that = this;
       // 分拆2队
       if (that.PkNum == 2) {
-        Rs.map(function (item, t) {
+        Rs.map(function(item, t) {
           item.group_no = (t % 2) + 1;
         });
       }
 
       // 分拆3队
       if (that.PkNum == 3) {
-        Rs.map(function (item, t) {
+        Rs.map(function(item, t) {
           item.group_no = (t % 3) + 1;
         });
       }
@@ -1511,7 +1418,7 @@ export default {
           if (json.Rs) {
             that.panel.bindList = json.Rs;
             let HrTypeText = "";
-            json.Rs.map(function (item, i) {
+            json.Rs.map(function(item, i) {
               HrTypeText = item.HrType == 1 ? "(私有)" : "";
               item.label = "Sn:" + item.Sn + HrTypeText;
               item.index = i + 1;
@@ -1605,7 +1512,7 @@ export default {
         birthday: row.Birthday,
         is_tmp_user: row.IsTmpUser,
         is_private: row.IsPrivate,
-        isOnline: row.IsOnline ? 1 : 0,
+        isOnline: parseInt(row.IsOnline),
       };
       duRs = '{"Rs":' + JSON.stringify(duRs).toString() + "}";
       let that = this;
@@ -1643,7 +1550,7 @@ export default {
     allSetOnline() {
       let that = this;
       let row = "";
-      that.tableData.map(function (item) {
+      that.tableData.map(function(item) {
         row = item;
         console.log(row);
         // 没有bindID的 且没有被禁用的 选中