wenningning 1 rok pred
rodič
commit
8847f2f88b

+ 1 - 1
sleep/pages/articles/healthAdvert/careHealthAdvertLook.vue

@@ -1,7 +1,7 @@
 <template>
   <view>
     <cu-custom isBack="true" bgColor="#000000">
-      <view slot="content" style="color: #FFFFFF">睡眠监测</view>
+      <view slot="content" style="color: #FFFFFF">UU睡眠</view>
     </cu-custom>
     <view class="bg-white">
       <view class="solids-bottom padding-xs flex align-center">

+ 2 - 2
sleep/pages/log/report/friendReport.vue

@@ -82,7 +82,7 @@
 
         <!-- report analysis -->
         <view class="flex-col report_analysis space-y-4">
-          <text class="self-start font_4 text_8">各项睡眠监测数据统计</text>
+          <text class="self-start font_4 text_8">各项睡眠数据统计</text>
 
           <view class="flex-col justify-start items-center relative report_analysis_data">
             <view class="flex-row equal-division space-x-29 pos">
@@ -342,7 +342,7 @@
 
                     <view class="flex-col group_15">
                       <view class="flex-row justify-between group_2">
-                        <text class="font_3 text_12">呼吸暂停</text>
+                        <text class="font_3 text_12">呼吸异常</text>
                       </view>
 
                       <view class="report_breath_chart">

+ 2 - 2
sleep/pages/log/report/reportDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="detail-page">
 		<cu-custom isBack="true" bgColor="#000000">
-		  <view slot="content" style="color: #FFFFFF">睡眠监测</view>
+		  <view slot="content" style="color: #FFFFFF">UU睡眠</view>
 		</cu-custom>
 
     <scroll-view scroll-x class="nav" scroll-with-animation :scroll-left="scrollLeft" style="background-color: rgba(20, 69, 215, 0.6)">
@@ -651,7 +651,7 @@
 
             <view class="flex-col group_15 margin-top">
               <view class="flex-row justify-between group_2">
-                <text class="font_3 text_12">呼吸暂停</text>
+                <text class="font_3 text_12">呼吸异常</text>
               </view>
               <view class="report_breath_chart">
                 <view class="charts-sleep-item charts-color">

+ 2 - 2
sleep/pages/login/auth.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="flex-col section">
-	  <cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">睡眠监测</view></cu-custom>
+	  <cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
 
 	  <view class="flex-col items-center group_3 space-y-20">
-	    <text class="text_2 text_3">睡眠监测</text>
+	    <text class="text_2 text_3">UU睡眠</text>
 	    <text class="font_1 text_2">AI时代,全家人的睡眠健康顾问</text>
 	  </view>
 	  <view class="flex-col group_4 space-y-20">

+ 3 - 3
sleep/pages/tabBar/find.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="recommend-container page-background">
 		<view class="bg-black">
-			<cu-custom bgColor="#000000"><view slot="content" style="color: #ffffff">睡眠监测</view></cu-custom>
+			<cu-custom bgColor="#000000"><view slot="content" style="color: #ffffff">UU睡眠</view></cu-custom>
 		</view>
 <!--		<scroll-view :style="{ height: height }" class="main-container" scroll-y>-->
 
@@ -94,8 +94,8 @@ export default {
     getCareHealthAdvert() {
       const data = {
         groupId: 12,
-        named: 'MATTRESS_FIND_1'
-        // named: 'MATTRESS_FIND_2'
+        // named: 'MATTRESS_FIND_1'
+        named: 'MATTRESS_FIND_2'
       }
       API_doctorAdvert.listByGroupId(data).then(res => {
         this.healthAdvertList = res

+ 5 - 5
sleep/pages/tabBar/home.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="home-container">
 		<view class="container-bg"></view>
-		<cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">睡眠监测</view></cu-custom>
+		<cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
 
 		<view class="flex-col home-module space-y-20 page">
 
@@ -23,7 +23,7 @@
 <!--				<view class="home-ad flex-col group_5 space-y-40">-->
 <!--					<view class="flex-col home-header space-y-6">-->
 <!--						<view class="flex-row items-center space-x-8">-->
-<!--							<text class="font_4 text_8">UU AI智能睡眠监测仪</text>-->
+<!--							<text class="font_4 text_8">UU AI智能UU睡眠仪</text>-->
 <!--							<view class="flex-row items-center section_7">-->
 <!--								<text class="font_5 text_9">去看看</text>-->
 <!--								<image-->
@@ -280,9 +280,9 @@
           </form>
         </view>
         <view class="cu-bar bg-white justify-end">
-          <view class="action">
-            <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>
-          </view>
+<!--          <view class="action">-->
+<!--            <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>-->
+<!--          </view>-->
           <view class="action">
             <button class="cu-btn bg-green margin-left" @tap="bindDevice">确定</button>
           </view>

+ 50 - 15
sleep/pages/tabBar/my.vue

@@ -3,7 +3,7 @@
     <view class="container-bg"></view>
 
     <cu-custom bgColor="#fff">
-      <view slot="content" style="color: #FFFFFF">睡眠监测</view>
+      <view slot="content" style="color: #FFFFFF">UU睡眠</view>
     </cu-custom>
 
     <view class="flex-col justify-start page">
@@ -77,6 +77,10 @@
                 <image class="image_4" src="../../static/home/homeIconAdd.png"/>
                 <view class="text_5" @click="addBindDevice">添加设备</view>
               </view>
+              <view class="flex-row justify-center items-center home_add_devive space-x-10 margin-top-xs" @click="goBuy">
+                <image class="image_4" src="../../static/home/homeIconAdd.png"/>
+                <view class="text_5" @click="goBuy">购买设备</view>
+              </view>
             </view>
 
             <view v-if="deviceList.length > 0" v-for="(item, index) in deviceList" :key="index" class="flex-col my_device_default space-y-6">
@@ -149,6 +153,12 @@
                   <text class="self-start font_13">剩余语音</text>
                 </view>
               </view>
+
+              <view v-if="myBg" class="flex-row justify-center items-center space-x-10 my_shop" :style="'background-image: url(' + myBg + ')'" @click="goBuy">
+<!--                <image class="image_4" src="../../static/home/shop.png"/>-->
+<!--                <view class="text_5" @click="goBuy">必有好物<text class="text-xs margin-left">官方旗舰店</text></view>-->
+              </view>
+
               <view class="flex-col justify-start my_settings">
                 <view class="grid">
                   <!--		              <view class="flex-col items-center relative grid-item space-y-8">-->
@@ -183,6 +193,11 @@
                     <text class="font_13 text_28">用户协议</text>
                   </view>
 
+                  <view class="flex-col items-center relative grid-item space-y-8" @click="goBuy">
+                    <image class="image_17" src="../../static/mine/shop.png"/>
+                    <text class="font_13 text_28">好物商城</text>
+                  </view>
+
                   <!--		              <view class="flex-col items-center relative grid-item space-y-8">-->
                   <!--		                <image-->
                   <!--		                  class="image_17"-->
@@ -224,9 +239,9 @@
           </form>
         </view>
         <view class="cu-bar bg-white justify-end">
-          <view class="action">
-            <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>
-          </view>
+<!--          <view class="action">-->
+<!--            <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>-->
+<!--          </view>-->
           <view class="action">
             <button class="cu-btn bg-green margin-left" @tap="bindDevice">确定</button>
           </view>
@@ -296,7 +311,7 @@ import * as API_deviceMemberBind from '@/api/device_member_bind'
 import * as API_SLEEP_REPORT from '@/api/sleep_report'
 import * as API_MEMBER_WARN_SWITCH from '@/api/member_warn_switch'
 import * as deviceDtypeEnum from '@/utils/enum/DeviceDTypeEnum'
-import {editDevice} from "../../api/device_member_bind";
+import { getArticleByPosition } from '../articles'
 
 export default {
   data() {
@@ -317,7 +332,8 @@ export default {
       updateDeviceFrom: {
         userName: '',
         id: null
-      }
+      },
+      myBg: null
 
     };
   },
@@ -359,10 +375,10 @@ export default {
         })
       }
       if (this.deviceList) {
-        console.log('this.deviceList===', this.deviceList)
         this.API_getNewReport()
       }
       this.getSmsVoiceQty()
+      this.getMyBg()
     }
   },
   methods: {
@@ -725,6 +741,11 @@ export default {
         this.API_getDeviceList()
       })
     },
+    getMyBg() {
+      getArticleByPosition('MATTRESS_AD').then(res => {
+        this.myBg = res.outside_url
+      })
+    },
 
   ...mapActions({
       logout: 'logoutAction',
@@ -740,17 +761,12 @@ export default {
 	background-color: rgba(14, 52, 147, 1);
 	border-radius: 1rem;
 	backdrop-filter: blur(0.63rem);
-
-	.image_4 {
-	    width: 1.5rem;
-	    height: 1.5rem;
-	  }
 	  .text_5 {
 	    color: #ffffff;
 	    font-size: 1.3rem;
 	    font-family: PingFangSC;
 	    line-height: 1.38rem;
-		margin-left: 0.5rem
+		  margin-left: 0.5rem
 		}
 	}
 .power-module {
@@ -960,7 +976,7 @@ export default {
       & > view:not(:first-child),
       & > text:not(:first-child),
       & > image:not(:first-child) {
-        margin-top: 1.88rem;
+        margin-top: 1rem;
       }
 
       z-index: 100;
@@ -988,7 +1004,26 @@ export default {
           }
         }
       }
-
+      .image_4 {
+        width: 1.5rem;
+        height: 1.5rem;
+      }
+      .my_shop {
+        //background-image: url('/static/mine/shop (1).png');
+        background-size: 100% 100%;
+        background-repeat: no-repeat;
+        padding: 2.3rem 1.05rem;
+        background-color: rgba(250, 5, 74, 0.8);
+        border-radius: 1rem;
+        backdrop-filter: blur(0.63rem);
+        .text_5 {
+          color: #ffffff;
+          font-size: 1.3rem;
+          font-family: PingFangSC;
+          line-height: 1.38rem;
+          margin-left: 0.5rem
+        }
+      }
       .my_settings {
         padding: 0.63rem 0;
         background-color: #1241b8cc;

+ 6 - 6
sleep/pages/tabBar/report.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="report-container">
 
-		<cu-custom bgColor="#000000"><view slot="content" style="color: #FFFFFF">睡眠监测</view></cu-custom>
+		<cu-custom bgColor="#000000"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
 
 		<view v-if="!isDeviceAdded" class="flex-col no-device-page">
 		  <view class="flex-col flex-auto image-wrapper_2">
@@ -81,7 +81,7 @@
 
 				<!-- report analysis -->
 				<view class="flex-col report_analysis space-y-4">
-					<text class="self-start font_4 text_8">各项睡眠监测数据统计</text>
+					<text class="self-start font_4 text_8">各项睡眠数据统计</text>
 
 					<view class="flex-col justify-start items-center relative report_analysis_data">
 						<view class="flex-row equal-division space-x-29 pos">
@@ -350,7 +350,7 @@
                     <view class="list-divider"></view>
                     <view class="flex-col group_15">
                       <view class="flex-row justify-between group_2">
-                        <text class="font_3 text_12">呼吸暂停</text>
+                        <text class="font_3 text_12">呼吸异常</text>
     <!--							      <view class="flex-row items-center space-x-30">-->
     <!--							        <view class="flex-row items-baseline shrink-0 space-x-6">-->
     <!--							          <text class="font_5">{{ sleepReportFrom.report_content.snoring_count.value }}</text>-->
@@ -445,9 +445,9 @@
           </form>
         </view>
         <view class="cu-bar bg-white justify-end">
-          <view class="action">
-            <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>
-          </view>
+<!--          <view class="action">-->
+<!--            <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>-->
+<!--          </view>-->
           <view class="action">
             <button class="cu-btn bg-green margin-left" @tap="bindDevice">确定</button>
           </view>

+ 7 - 7
sleep/pages/user/alertSetting/index.vue

@@ -27,7 +27,7 @@
               </view>
               <view class="flex-row items-end space-x-4 items-center">
                 <switch :checked="switchFrom.sign_horn_switch" color="#1E09DE" style="transform:scale(0.7)" @change="switchTzHorn"/>
-                <text class="font_2">喇叭</text>
+                <text class="font_2">喇叭</text>
               </view>
             </view>
             <view class="flex-col">
@@ -72,7 +72,7 @@
               </view>
               <view class="flex-row items-end space-x-4 items-center">
                 <switch :checked="switchFrom.sign_horn_switch" color="#1E09DE" style="transform:scale(0.7)" @change="switchTzHorn"/>
-                <text class="font_2">喇叭</text>
+                <text class="font_2">喇叭</text>
               </view>
             </view>
             <view class="flex-col">
@@ -126,7 +126,7 @@
               </view>
               <view class="flex-row items-end space-x-4 items-center">
                 <switch :checked="switchFrom.out_of_bed_horn_switch" color="#1E09DE" style="transform:scale(0.7)" @change="switchOutHorn"/>
-                <text class="font_2">喇叭</text>
+                <text class="font_2">喇叭</text>
               </view>
             </view>
             <view class="flex-col group_7">
@@ -149,7 +149,7 @@
                 </view>
               </view>
               <view class="flex-row justify-between items-center group_10">
-                <text class="font_2 text_3">离床未归提醒</text>
+                <text class="font_2 text_3">离床未归时间</text>
                 <view class="flex-row items-center group_11 space-x-8">
                   <picker @change="pickerChange" :range="sleepWornList.leave_durationList" data-target="5">
                     <view class="uni-input">
@@ -168,17 +168,17 @@
           <text class="self-start font_1">紧急求助开关</text>
           <view class="flex-col justify-start items-start section_8">
             <view class="flex-row space-x-6">
-              <view class="flex-row items-center equal-division-item space-x-4">
+              <view class="flex-row items-end space-x-4 items-center">
                 <switch :checked="switchFrom.sos_sms_switch" color="#1E09DE" style="transform:scale(0.7)" @change="switchSosSms" />
                 <text class="font_2">短信</text>
               </view>
-              <view class="flex-row items-center equal-division-item space-x-4">
+              <view class="flex-row items-end space-x-4 items-center">
                 <switch :checked="switchFrom.sos_voice_switch" color="#1E09DE" style="transform:scale(0.7)" @change="switchSosVoice" />
                 <text class="font_2">电话</text>
               </view>
               <view class="flex-row items-end space-x-4 items-center">
                 <switch :checked="switchFrom.sos_horn_switch" color="#1E09DE" style="transform:scale(0.7)" @change="switchSosHorn"/>
-                <text class="font_2">喇叭</text>
+                <text class="font_2">喇叭</text>
               </view>
             </view>
           </view>

BIN
sleep/static/mine/shop.png


+ 18 - 1
sleep/utils/vue-mixin.js

@@ -203,9 +203,26 @@ const mixin = {
 			}
 		},
 		goBuy() {
+			const deviceList = Storage.getItem('myBindDevices')
+			let shopId = null
+			if (deviceList) {
+				const size = deviceList.length
+				shopId = deviceList[0].shop_id
+				if (size > 1) {
+					for (let i = 0; i < size; i ++) {
+						if (deviceList[i].shop_id !== shopId) {
+							shopId = null
+							break
+						}
+					}
+				}
+			}
+			let data = shopId ? '&shopId=' + shopId : ''
+			let path = '/pages/calorie/list?type=SHOPPING&page=shopping&no=1789' + data
+			console.log('path====', path)
 			wx.navigateToMiniProgram({
 				appId: this.userMiniProgramAppId,
-				path: '/pages/b2b2c/index?type=SHOPPING&page=shopping&no=1789',
+				path: path,
 				//develop开发版;trial体验版;release正式版
 				// envVersion: 'release',
 				envVersion: 'trial',