Bladeren bron

Merge remote-tracking branch 'origin/master'

wgl 4 jaren geleden
bovenliggende
commit
ddee897c1d

+ 56 - 7
src/assets/css/xpwyfyy.css

@@ -875,7 +875,8 @@ h3 {
 	overflow: hidden;
 }
 
-.faceaifyy-content .mui-media-body {
+.faceaifyy-content .mui-media-body ,
+.vongi-toup .mui-media-object span{
 	background: rgba(0, 0, 0, 0.5);
 	padding: 5px;
 	position: absolute;
@@ -883,8 +884,14 @@ h3 {
 	color: #ffffff;
 	width: 100%;
     text-align: center;
+    line-height: 21px;
+    z-index: 99;
+    display: block;
 }
-
+.vongi-toup .mui-media-object {
+	position:relative
+}
+.vongi-toup .mui-media-object span
 .faceaifyy-content .mui-media-body span {
 	margin-left: 5px
 }
@@ -993,7 +1000,8 @@ h3 {
 }
 
 .vongi-btn {
-	padding: 15px
+	padding: 15px;
+	text-align: center;
 }
 
 .vongi-btn button {
@@ -3312,7 +3320,9 @@ h3 {
 	font-size:14px;
 	color:#101010
 }
-
+.vongi-sqtpdat-name .color4fc5f7{
+	color: #3385FF
+}
 .vongi-sqtpdat-time{
 	background:#3385FF;
 	color:#ffffff;
@@ -3357,7 +3367,7 @@ h3 {
 	display: block;
 	line-height: 1.5;
 }
-.vongi-sqtpdat .fyy-slider .mui-table-view .mui-table-view-cell button{
+.vongi-toup .mui-table-view-cell button{
 	position:initial;
 	transform:initial;
 	-webkit-transform:initial;
@@ -3365,12 +3375,26 @@ h3 {
 	border-radius: 16px;
 	margin:5px 0
 }
+.vongi-toup .fyy-scon-det-down button{
+	width:50%;
+	border-radius: 16px;
+}
+.vongi-sqtpdat-name .vongi-toup-text p{
+	margin-bottom:10px;
+	padding:0
+}
+.vongi-toup-text{
+	padding:10px
+}
+.vongi-toup .vongi-btn button{
+	width:50%;
+}
 .vongi-sqtpdat-slider{
 	padding:0 10px;
 	margin-bottom:15px
 }
 .vongi-sqtpdat-slider .mui-slider-group{
-	display: initial;
+	display: table;
 	
 }
 .vongi-sqtpdat-slider .mui-slider-group .mui-slider-item{
@@ -3483,4 +3507,29 @@ h3 {
 .vongi-cytx-date{
 	padding:10px 15px;
 	background:#FAFAFA
-}
+}
+.vongi-tell .mui-media-object{
+	width:88px;
+	height:88px;
+	border-radius: 50%;
+	background:#EEEEEE;
+	display: flex;
+	justify-content: center;
+	overflow: hidden;
+	margin:0 auto
+}
+.vongi-tell .mui-media-object img{
+	object-fit: cover;
+	width:100%
+}
+.vongi-tell .mui-h1{
+	padding:20px 15px;
+	border-top:1px #ddd solid;
+	border-bottom:1px #ddd solid
+}
+.vongi-tell .vongi-center{
+	padding:30px
+}
+.vongi-tell .iconfont{
+	font-size:30px
+}

+ 2 - 2
src/projects/pension/apis/Master/live.js

@@ -5,7 +5,7 @@ import Qs from 'qs';
 export function queryCameraList(params) {
 
     return request({
-        url: '/mobile/cameraApi/cameraList',
+        url: '/mobile/cameraApi/cameraListPension',
         data: Qs.stringify(params),
         method: 'post',
     })
@@ -35,7 +35,7 @@ export function submit(params) {
 export function cameraDetail(params) {
 
     return request({
-        url: '/mobile/cameraApi/cameraDetail',
+        url: '/mobile/cameraApi/cameraDetailPension',
         data: Qs.stringify(params),
         method: 'post',
     })

+ 302 - 300
src/projects/pension/views/Master/Home.vue

@@ -1,320 +1,322 @@
 <template>
-	<div>
-		<common ref="common" @asynCallBack="asynCallBack"></common>
-		<top-header :pageTitle="pageTitle" headerClass="vongi-bar" :leftShow="false"></top-header>
+<div>
+    <common ref="common" @asynCallBack="asynCallBack"></common>
+    <top-header :pageTitle="pageTitle" headerClass="vongi-bar" :leftShow="false"></top-header>
 
-		<div class="mui-content margin49">
-			<div class="vongi-index">
-				<div class="vongi-index-top">
-					<div class="mui-media-object mui-pull-left">
-						<img :src="person_data?person_data.faceImageUrl:''">
-					</div>
-					<div class="mui-media-body">
-						<h3 v-text="person_data?person_data.name:''"></h3>
-						<p class='mui-ellipsis' v-text="person_popedom?(person_popedom.job?person_popedom.job:person_popedom.personRoleName):''"></p>
-					</div>
-					<a class="mui-pull-right" @click="selectRole">切换身份<span class="mui-icon iconfont icon-jiaohuan"></span></a>
-				</div>
-			</div>
-			<div class="vongi-icons">
-				<div class="vongi-index">
-					<ul class="mui-table-view mui-grid-view mui-grid-9 vongi-grid-head">
-						<li v-for="(item,index) in common_menu_list" :class="'mui-table-view-cell mui-media mui-col-xs-3 '+(item.iconRoute?'':'kfz')">
-							<router-link :to="{name:item.iconRoute,query:item.iconParam}">
-								<img :src="requirePic(item.iconCommonPic)" />
-								<div class="mui-media-body" v-text="item.iconName"></div>
-							</router-link>
-						</li>
-					</ul>
-				</div>
-				<ul class="mui-table-view mui-grid-view mui-grid-9">
-					<li v-for="(item,index) in menu_list" :class="'mui-table-view-cell mui-media mui-col-xs-3 '+(item.iconRoute?'':'kfz')">
-						<router-link :to="{name:item.iconRoute,query:item.iconParam}">
-							<img :src="requirePic(item.iconPic)" />
-							<div class="mui-media-body" v-text="item.iconName"></div>
-						</router-link>
-					</li>
-					<li class="mui-table-view-cell mui-media mui-col-xs-3">
-						<router-link :to="{name:'MasterAllFun'}">
-							<img src="~$project/assets/img/cicon30.png" />
-							<div class="mui-media-body">全部</div>
-						</router-link>
-					</li>
-				</ul>
-			</div>
-			<div class="vongi-index-floor">
-				<h4 class="vongi-floor-title">功能推荐区</h4>
-				<div class="vongi-index-inter flew-sp">
-					<div class="mui-col-xs-6">
-						<router-link :to="{name:'MasterMineEditInfo'}" class="vongi-floor-padded">
-							<div class="mui-media-body">
-								<h4 class="mui-ellipsis">关联健康码</h4>
-								<p class="mui-ellipsis">出行更便捷</p>
-							</div>
-							<img class="mui-media-object mui-pull-right" src="~$project/assets/img/cicon15.png" width="54" />
-						</router-link>
-					</div>
-					<div class="mui-col-xs-6">
-						<router-link :to="{name:'MasterMineFeedback'}" class="vongi-floor-padded">
-							<div class="mui-media-body">
-								<h4 class="mui-ellipsis">问题反馈</h4>
-								<p class="mui-ellipsis">感谢您的发声</p>
-							</div>
-							<img class="mui-media-object mui-pull-right" src="~$project/assets/img/cicon18.png" width="54" />
-						</router-link>
-					</div>
-					<div v-if="noticeList.length" class="mui-col-xs-12">
-						<div class="vongi-floor-padded">
-							<router-link :to="{name:'CommonNotice',query:{type:1}}" v-for="(item,index) in noticeList" :key="index" :class="'text-list '+(item.readStatus?'':'red-after')">
-								<h5 class="mui-ellipsis" v-text="item.title"></h5><span v-text="item.date"></span>
-							</router-link>
-						</div>
-						<router-link :to="{name:'CommonNotice',query:{type:1}}" class="vongi-link"><span class="mui-icon mui-icon-forward"></span></router-link>
-					</div>
-					<div class="mui-col-xs-12">
-						<div id="slider" class="mui-slider">
-							<div class="mui-slider-group">
-								<!-- 第一张 -->
-								<div class="mui-slider-item">
-									<a href="javascript:void(0)">
-										<img src="~$project/assets/img/02.jpg">
-									</a>
-								</div>
-								<!-- 第二张 -->
-								<div class="mui-slider-item">
-									<a href="javascript:void(0)">
-										<img src="~$project/assets/img/02.jpg">
-									</a>
-								</div>
-							</div>
-							<div class="mui-slider-indicator">
-								<div class="mui-indicator mui-active"></div>
-								<div class="mui-indicator"></div>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-			<div class="vongi-index-floor ">
-				<h4 class="vongi-floor-title">优品推荐</h4>
-				<div class="vongi-index-inter flew-sp">
-					<div class="mui-col-xs-12">
-						<ul class="mui-table-view mui-grid-view mui-grid-9 vongi-floor-padded">
-							<li class="mui-table-view-cell mui-media mui-col-xs-6">
-								<a @click="toPay()">
-									<div class="vongi-shop-img"><img src="http://oss.xiaoxinda.com/smart/person/2020/10/18174320745.png" width="100%" /></div>
-									<div class="mui-media-body">老人智能安全监控手表</div>
-									<div class="mui-media-body color-yellow">¥0.01</div>
-								</a>
-							</li>
+    <div class="mui-content margin49">
+        <div class="vongi-index">
+            <div class="vongi-index-top">
+                <div class="mui-media-object mui-pull-left">
+                    <img :src="person_data?person_data.faceImageUrl:''">
+                </div>
+                <div class="mui-media-body">
+                    <h3 v-text="person_data?person_data.name:''"></h3>
+                    <p class='mui-ellipsis' v-text="person_popedom?(person_popedom.job?person_popedom.job:person_popedom.personRoleName):''"></p>
+                </div>
+                <a class="mui-pull-right" @click="selectRole">切换身份<span class="mui-icon iconfont icon-jiaohuan"></span></a>
+            </div>
+        </div>
+        <div class="vongi-icons">
+            <div class="vongi-index">
+                <ul class="mui-table-view mui-grid-view mui-grid-9 vongi-grid-head">
+                    <li v-for="(item,index) in common_menu_list" :class="'mui-table-view-cell mui-media mui-col-xs-3 '+(item.iconRoute?'':'kfz')">
+                        <router-link :to="{name:item.iconRoute,query:item.iconParam}">
+                            <img :src="requirePic(item.iconCommonPic)" />
+                            <div class="mui-media-body" v-text="item.iconName"></div>
+                        </router-link>
+                    </li>
+                </ul>
+            </div>
+            <ul class="mui-table-view mui-grid-view mui-grid-9">
+                <li v-for="(item,index) in menu_list" :class="'mui-table-view-cell mui-media mui-col-xs-3 '+(item.iconRoute?'':'kfz')">
+                    <router-link :to="{name:item.iconRoute,query:item.iconParam}">
+                        <img :src="requirePic(item.iconPic)" />
+                        <div class="mui-media-body" v-text="item.iconName"></div>
+                    </router-link>
+                </li>
+                <li class="mui-table-view-cell mui-media mui-col-xs-3">
+                    <router-link :to="{name:'MasterAllFun'}">
+                        <img src="~$project/assets/img/cicon30.png" />
+                        <div class="mui-media-body">全部</div>
+                    </router-link>
+                </li>
+            </ul>
+        </div>
+        <div class="vongi-index-floor">
+            <h4 class="vongi-floor-title">功能推荐区</h4>
+            <div class="vongi-index-inter flew-sp">
+                <div class="mui-col-xs-6">
+                    <router-link :to="{name:'MasterMineEditInfo'}" class="vongi-floor-padded">
+                        <div class="mui-media-body">
+                            <h4 class="mui-ellipsis">关联健康码</h4>
+                            <p class="mui-ellipsis">出行更便捷</p>
+                        </div>
+                        <img class="mui-media-object mui-pull-right" src="~$project/assets/img/cicon15.png" width="54" />
+                    </router-link>
+                </div>
+                <div class="mui-col-xs-6">
+                    <router-link :to="{name:'MasterMineFeedback'}" class="vongi-floor-padded">
+                        <div class="mui-media-body">
+                            <h4 class="mui-ellipsis">问题反馈</h4>
+                            <p class="mui-ellipsis">感谢您的发声</p>
+                        </div>
+                        <img class="mui-media-object mui-pull-right" src="~$project/assets/img/cicon18.png" width="54" />
+                    </router-link>
+                </div>
+                <div v-if="noticeList.length" class="mui-col-xs-12">
+                    <div class="vongi-floor-padded">
+                        <router-link :to="{name:'CommonNotice',query:{type:1}}" v-for="(item,index) in noticeList" :key="index" :class="'text-list '+(item.readStatus?'':'red-after')">
+                            <h5 class="mui-ellipsis" v-text="item.title"></h5><span v-text="item.date"></span>
+                        </router-link>
+                    </div>
+                    <router-link :to="{name:'CommonNotice',query:{type:1}}" class="vongi-link"><span class="mui-icon mui-icon-forward"></span></router-link>
+                </div>
+                <div class="mui-col-xs-12">
+                    <div id="slider" class="mui-slider">
+                        <div class="mui-slider-group">
+                            <!-- 第一张 -->
+                            <div class="mui-slider-item">
+                                <a href="javascript:void(0)">
+                                    <img src="~$project/assets/img/02.jpg">
+                                </a>
+                            </div>
+                            <!-- 第二张 -->
+                            <div class="mui-slider-item">
+                                <a href="javascript:void(0)">
+                                    <img src="~$project/assets/img/02.jpg">
+                                </a>
+                            </div>
+                        </div>
+                        <div class="mui-slider-indicator">
+                            <div class="mui-indicator mui-active"></div>
+                            <div class="mui-indicator"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="vongi-index-floor kfz">
+            <h4 class="vongi-floor-title">优品推荐</h4>
+            <div class="vongi-index-inter flew-sp">
+                <div class="mui-col-xs-12">
 
-						</ul>
-					</div>
-				</div>
-			</div>
-		</div>
+                    <ul class="mui-table-view mui-grid-view mui-grid-9 vongi-floor-padded">
+                        <li class="mui-table-view-cell mui-media mui-col-xs-6">
+                            <a href="javascript:void(0)">
+                                <div class="vongi-shop-img"><img src="http://oss.xiaoxinda.com/smart/person/2020/10/18174320745.png" width="100%" /></div>
+                                <div class="mui-media-body">老人智能安全监控手表</div>
+                                <div class="mui-media-body color-yellow">
+                                    <!--¥299.0-->
+                                </div>
+                            </a>
+                        </li>
 
-		<nav-menu :router="[{name:'Master'},{name:'MasterMineMessage'},{name:'MasterMineCenter'}]"></nav-menu>
+                    </ul>
+                </div>
+            </div>
+        </div>
+    </div>
 
-		<loading :visible="isLoading"></loading>
-	</div>
+    <nav-menu :router="[{name:'Master'},{name:'MasterMineMessage'},{name:'MasterMineCenter'}]"></nav-menu>
+
+    <loading :visible="isLoading"></loading>
+</div>
 </template>
 
 <script>
-	require('$project/assets/js/mui.picker.min.js');
-	import * as API from '@/apis/Master/live'
-	import * as API_Notice from '@/apis/Common/notice'
-	import * as API_User from '$project/apis/user'
-	import Common from '$project/components/Common.vue'
-	import Loading from '$project/components/Loading.vue'
-	import TopHeader from '$project/components/TopHeader.vue'
-	import NavMenu from '@/components/NavMenu.vue'
-	import {
-		mapGetters,
-		mapMutations
-	} from 'vuex'
-	import * as types from '$project/store/mutation-types'
-	export default {
-		name: 'Master',
-		components: {
-			Common,
-			Loading,
-			TopHeader,
-			NavMenu
-		},
-		data() {
-			return {
-				isLoading: false,
+require('$project/assets/js/mui.picker.min.js');
+import * as API from '@/apis/Master/live'
+import * as API_Notice from '@/apis/Common/notice'
+import * as API_User from '$project/apis/user'
+import Common from '$project/components/Common.vue'
+import Loading from '$project/components/Loading.vue'
+import TopHeader from '$project/components/TopHeader.vue'
+import NavMenu from '@/components/NavMenu.vue'
+import {
+    mapGetters,
+    mapMutations
+} from 'vuex'
+import * as types from '$project/store/mutation-types'
+export default {
+    name: 'Master',
+    components: {
+        Common,
+        Loading,
+        TopHeader,
+        NavMenu
+    },
+    data() {
+        return {
+            isLoading: false,
+
+            roleList: [],
 
-				roleList: [],
+            noticeList: [],
+        }
+    },
+    created() {},
+    methods: {
+        toPay() {
+            this.isLoading = true;
 
-				noticeList: [],
-			}
-		},
-		created() {},
-		methods: {
-			toPay() {
-				this.isLoading = true;
+            API.submit({
+                "personId": this.person_data.id,
+                "payPersonId": this.person_data.id,
+                "goodsId": "2",
+            }).then(data => {
 
-				API.submit({
-					"personId": this.person_data.id,
-					"payPersonId": this.person_data.id,
-					"goodsId": "2",
-				}).then(data => {
+                var url = window.location.href.split("#")[0];
+                var param = JSON.stringify(data).replace("{", "").replace("}", "").replace(/\",\"/g, "&").replace(/,\"/g, "&").replace(
+                    /:/g, "=").replace(/\":\"/g, "=").replace(/\"/g, "");
+                param = param.replace('=//', '://');
+                window.location = url + "?#/master/live/pay?" + param;
 
-					var url = window.location.href.split("#")[0];
-					var param = JSON.stringify(data).replace("{", "").replace("}", "").replace(/\",\"/g, "&").replace(/,\"/g, "&").replace(
-						/:/g, "=").replace(/\":\"/g, "=").replace(/\"/g, "");
-					param = param.replace('=//', '://');
-					window.location = url + "?#/master/live/pay?" + param;
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
 
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
+        },
+        //获取用户角色列表
+        getRoleList() {
+            //this.isLoading = true;
+            API_User.getRoleList().then(response => {
+                this.isLoading = false;
 
+                this.roleList = response.list;
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+        },
+        //选择角色
+        selectRole() {
+            var roleList = [];
+            for (var i = 0; i < this.roleList.length; i++) {
+                var preName = this.person_popedom.id == this.roleList[i]['id'] ? '(当前)' : '';
+                roleList.push({
+                    value: this.roleList[i]['id'],
+                    text: preName + this.roleList[i]['companyName'] + ' ' + this.roleList[i]['personRoleName'],
+                })
+            }
+            var _this = this;
+            var picker = new mui.PopPicker();
+            picker.setData(roleList);
+            picker.show(function (selectItems) {
+                _this.switchRole(selectItems[0].value);
+            })
+        },
+        //切换角色
+        switchRole(id) {
+            this.isLoading = true;
+            API_User.exchangePopedom({
+                id: id
+            }).then(response => {
+                this.isLoading = false;
 
-			},
-			//获取用户角色列表
-			getRoleList() {
-				//this.isLoading = true;
-				API_User.getRoleList().then(response => {
-					this.isLoading = false;
+                this.$refs.common.getDataByOpenId();
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+        },
+        //预读取通知消息
+        prefetchNotice() {
+            //this.isLoading = true;
+            API_Notice.prefetch().then(response => {
+                this.isLoading = false;
 
-					this.roleList = response.list;
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-			},
-			//选择角色
-			selectRole() {
-				var roleList = [];
-				for (var i = 0; i < this.roleList.length; i++) {
-					var preName = this.person_popedom.id == this.roleList[i]['id'] ? '(当前)' : '';
-					roleList.push({
-						value: this.roleList[i]['id'],
-						text: preName + this.roleList[i]['companyName'] + ' ' + this.roleList[i]['personRoleName'],
-					})
-				}
-				var _this = this;
-				var picker = new mui.PopPicker();
-				picker.setData(roleList);
-				picker.show(function(selectItems) {
-					_this.switchRole(selectItems[0].value);
-				})
-			},
-			//切换角色
-			switchRole(id) {
-				this.isLoading = true;
-				API_User.exchangePopedom({
-					id: id
-				}).then(response => {
-					this.isLoading = false;
+                this.set_wd_message_num(response);
 
-					this.$refs.common.getDataByOpenId();
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-			},
-			//预读取通知消息
-			prefetchNotice() {
-				//this.isLoading = true;
-				API_Notice.prefetch().then(response => {
-					this.isLoading = false;
-					
-					this.set_wd_message_num(response);
-					
-					this.getLastNotice();
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-			},
-			//获取最新二条通知消息
-			getLastNotice() {
-				//this.isLoading = true;
-				API_Notice.getTopList({
-					type: 1,
-					limit: 2,
-					excludeMessageId: ''
-				}).then(response => {
-					this.noticeList = response;
-					this.isLoading = false;
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-			},
-			//引入图片
-			requirePic(file) {
-				if (file) {
-					if (file.indexOf('http') == 0) {
-						return file;
-					} else {
-						return require('$project/assets/img/' + file);
-					}
-				}
-			},
-			//设置判断首页模式
-			setHomeModel() {
-				if (!this.persion_home_model) {
-					this.set_persion_home_model('normal');
-				}
-				if (this.persion_home_model != 'normal') {
-					this.$router.push({
-						name: 'MasterHomeBigFont'
-					})
-				}
-			},
-			asynCallBack() {
-				//获取用户角色列表
-				this.getRoleList();
-				//获取最新二条通知消息
-				this.prefetchNotice();
+                this.getLastNotice();
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+        },
+        //获取最新二条通知消息
+        getLastNotice() {
+            //this.isLoading = true;
+            API_Notice.getTopList({
+                type: 1,
+                limit: 2,
+                excludeMessageId: ''
+            }).then(response => {
+                this.noticeList = response;
+                this.isLoading = false;
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+        },
+        //引入图片
+        requirePic(file) {
+            if (file) {
+                if (file.indexOf('http') == 0) {
+                    return file;
+                } else {
+                    return require('$project/assets/img/' + file);
+                }
+            }
+        },
+        //设置判断首页模式
+        setHomeModel() {
+            if (!this.persion_home_model) {
+                this.set_persion_home_model('normal');
+            }
+            if (this.persion_home_model != 'normal') {
+                this.$router.push({
+                    name: 'MasterHomeBigFont'
+                })
+            }
+        },
+        asynCallBack() {
+            //获取用户角色列表
+            this.getRoleList();
+            //获取最新二条通知消息
+            this.prefetchNotice();
 
-			},
-			...mapMutations({
-				set_persion_home_model: types.SET_PERSION_HOME_MODEL,
-				set_wd_message_num: types.SET_WD_MESSAGE_NUM,
-			})
-		},
-		mounted() {
-			//设置判断首页模式
-			this.setHomeModel();
+        },
+        ...mapMutations({
+            set_persion_home_model: types.SET_PERSION_HOME_MODEL,
+            set_wd_message_num: types.SET_WD_MESSAGE_NUM,
+        })
+    },
+    mounted() {
+        //设置判断首页模式
+        this.setHomeModel();
 
-			var gallery = mui('.mui-slider');
-			var slider = gallery.slider({
-				interval: 2000, //自动轮播周期,若为0则不自动播放,默认为0;
-				bounce: true //是否启用回弹
-			});
-		},
-		destroyed() {
+        var gallery = mui('.mui-slider');
+        var slider = gallery.slider({
+            interval: 2000, //自动轮播周期,若为0则不自动播放,默认为0;
+            bounce: true //是否启用回弹
+        });
+    },
+    destroyed() {
 
-		},
-		computed: {
-			pageTitle: {
-				// getter
-				get: function() {
-					return this.person_data ? this.person_data.companyName : '小鹏管家';
-				},
-				// setter
-				set: function(newValue) {
-					console.log(newValue)
-				}
-			},
-			...mapGetters({
-				openId: 'wx_openid',
-				token: 'token',
-				person_data: 'person_data',
-				person_popedom: 'person_popedom',
-				menu_list: 'menu_list',
-				common_menu_list: 'common_menu_list',
-				persion_home_model: 'persion_home_model'
-			})
-		}
-	}
+    },
+    computed: {
+        pageTitle: {
+            // getter
+            get: function () {
+                return this.person_data ? this.person_data.companyName : '小鹏管家';
+            },
+            // setter
+            set: function (newValue) {
+                console.log(newValue)
+            }
+        },
+        ...mapGetters({
+            openId: 'wx_openid',
+            token: 'token',
+            person_data: 'person_data',
+            person_popedom: 'person_popedom',
+            menu_list: 'menu_list',
+            common_menu_list: 'common_menu_list',
+            persion_home_model: 'persion_home_model'
+        })
+    }
+}
 </script>
 
 <style scoped src="$project/assets/css/xpgj.css"></style>
@@ -322,7 +324,7 @@
 <style scoped src="$project/assets/css/pension.css"></style>
 <style src="$project/assets/css/mui.picker.min.css"></style>
 <style scoped>
-	.red-after:after {
-		background: red;
-	}
+.red-after:after {
+    background: red;
+}
 </style>

+ 143 - 149
src/projects/pension/views/Master/Live/Info.vue

@@ -1,160 +1,154 @@
 <template>
 <div>
 
-	<common @asynCallBack="asynCallBack"></common>
-	<top-header :pageTitle="pageTitle"   :routeName="routeName"    ></top-header>
-
-	<div class="mui-content vongi-fklist vongi-spkh" v-if="buystatus&&list.length" >
-				<div class="vongi-spkh-title flew">
-					<div class="mui-media-body">
-						<span class="mui-media-object mui-pull-left">
-							<img :src="person_data.faceImageUrl" :alt="person_data.name">
-						</span>  {{person_data.name}}
-					</div>
-					<p class='mui-ellipsis'>有效期至{{endtime}} <a @click="goToPay()" >续期</a></p>
-				</div>
-				<ul class="mui-table-view openfyy-list">
-					<li class="mui-table-view-cell mui-media"  v-for="(mod,index) in list">
-						<a @click="goToPlay(mod.id)" >
-							<div class="vongi-video-img">
- 								<img src="~$project/assets/img/default_webcam.png" v-if="!mod.picUrl"  width="100%">
-
-								<img :src="mod.picUrl"  v-if="mod.picUrl"  width="100%">
-							</div>
-							<div class="mui-media-body flew">
-								{{mod.roomAddress}}
-								<p class='mui-ellipsis'>[{{mod.status=='1'?'在线':'离线'}}]</p>
-							</div>
-						</a>
-					</li>
-				</ul>
-			</div>
-			<!--未开通服务状态-->
-			 <div class="mui-content vongi-spkh" v-if="!buystatus">
-				<div class="vongi-payyes-icon">
-					<img src="~$project/assets/img/gkke01.png" width="128" />
-					<h2>暂未开通视频看护服务</h2>
-				</div>
-				<div class="vongi-rec-btn-white">
-					<div class="vongi-rec-btn" @click="goToPay()">开通服务</div>
-				</div>
-			</div>
-			<!--已购买尚未开通状态-->
-			 <div class="mui-content vongi-spkh" v-if="buystatus&&!list.length" >
-				<div class="vongi-payyes-icon">
-					<img src="~$project/assets/img/spkh.png" />
-					<h2>感谢您购买视频看护服务<br>现已加入安装排期计划</h2>
-				</div>
-			</div>
-			<div class="fyy-footer" v-if="buystatus&&!list.length">
-				<div class="fyy-footer-text">
-					我们将会通过电话方式与您确定上门安装时间<br>
-					请保持联系方式的通讯畅通<br>
-					服务咨询电话: 400-8899-619
-				</div>
-			</div>
-	<loading :visible="isLoading"></loading>
+    <common @asynCallBack="asynCallBack"></common>
+    <top-header :pageTitle="pageTitle" :routeName="routeName"></top-header>
+
+    <div class="mui-content vongi-fklist vongi-spkh" v-if="buystatus&&list.length">
+
+        <ul class="mui-table-view openfyy-list">
+            <li class="mui-table-view-cell mui-media" v-for="(mod,index) in list">
+                <a @click="goToPlay(mod.id)">
+                    <div class="vongi-video-img">
+                        <img src="~$project/assets/img/default_webcam.png" v-if="!mod.picUrl" width="100%">
+
+                        <img :src="mod.picUrl" v-if="mod.picUrl" width="100%">
+                    </div>
+                    <div class="mui-media-body flew">
+                        {{mod.roomAddress}}
+                        <p class='mui-ellipsis'>[{{mod.status=='1'?'在线':'离线'}}]</p>
+                    </div>
+                </a>
+            </li>
+        </ul>
+    </div>
+    <!--未开通服务状态-->
+    <div class="mui-content vongi-spkh" v-if="!buystatus">
+        <div class="vongi-payyes-icon">
+            <img src="~$project/assets/img/gkke01.png" width="128" />
+            <h2>暂未开通视频看护服务</h2>
+        </div>
+        <div class="vongi-rec-btn-white">
+            <div class="vongi-rec-btn" @click="goToPay()">开通服务</div>
+        </div>
+    </div>
+    <!--已购买尚未开通状态-->
+    <div class="mui-content vongi-spkh" v-if="buystatus&&!list.length">
+        <div class="vongi-payyes-icon">
+            <img src="~$project/assets/img/spkh.png" />
+            <h2>您可以购买视频看护服务<br>加入安装排期计划</h2>
+        </div>
+
+    </div>
+    <div class="fyy-footer" v-if="buystatus&&!list.length">
+        <div class="fyy-footer-text">
+            我们将会通过电话方式与您确定上门安装时间<br>
+            请保持联系方式的通讯畅通<br>
+            服务咨询电话: 400-8899-619
+        </div>
+        <div class="vongi-rec-btn-white">
+            <div class="vongi-rec-btn" @click="goToPay()">查看介绍</div>
+        </div>
+    </div>
+    <loading :visible="isLoading"></loading>
 
 </div>
 </template>
 
-
 <script>
-
-	import * as API  from '@/apis/Master/live'
-	import Common from '$project/components/Common.vue'
-	import Loading from '$project/components/Loading.vue'
-	import TopHeader from '$project/components/TopHeader.vue'
-	import {
-		mapGetters,
-		mapMutations
-	} from 'vuex'
-	import {
-		currentTimeStamp,
-		parseUnixTime
-	} from '$project/utils'
-	export default {
-		name: 'MasterLiveInfo',
-		components: {
-			Common,
-			Loading,
-			TopHeader
-		},
-		data() {
-			return {
-				pageTitle: '视频看护',
-
-				buystatus: false,
-				list: [],
-				endtime: null,
-				isLoading: false,
-				routeName:'Master'
-
-			}
-		},
-		created() {
- 		},
-		methods:  {
-
-			goToPlay(cameraId) {
-				this.$router.push({
-					name: 'MasterLiveRoom',
-					query: {
-						id: cameraId
-					}
-				})
-			},
-			goToPay() {
-
-				this.$router.push({
-					name: 'MasterLiveShow',
-				})
-			},
-			queryCameraList() {
-				this.isLoading = true;
-
-				API.queryCameraList({
-					//currentId:this.student_current_info.id
-				}).then(response => {
-					this.isLoading = false;
-
-					this.buystatus = response.buystatus;
-					if (this.buystatus) {
-						this.list = response.list;
-						this.endtime = response.endtime;
-					}
-					if(false){
-
-						this.$router.push({
-							name: 'MasterLiveShow',
-							query: {
-								routeName: "Master"
-							}
-						})
-					}
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-			},asynCallBack(){},
-		},
-		mounted() {
-			this.queryCameraList();
-		},
-
-
-		destroyed() {
-
-		},
-		computed: {
-			...mapGetters({
-				openId: 'wx_openid',
-				token: 'token',
-				person_data: 'person_data',
-				person_popedom: 'person_popedom',
-			})
-		}
-	}
+import * as API from '@/apis/Master/live'
+import Common from '$project/components/Common.vue'
+import Loading from '$project/components/Loading.vue'
+import TopHeader from '$project/components/TopHeader.vue'
+import {
+    mapGetters,
+    mapMutations
+} from 'vuex'
+import {
+    currentTimeStamp,
+    parseUnixTime
+} from '$project/utils'
+export default {
+    name: 'MasterLiveInfo',
+    components: {
+        Common,
+        Loading,
+        TopHeader
+    },
+    data() {
+        return {
+            pageTitle: '视频看护',
+
+            buystatus: false,
+            list: [],
+            endtime: null,
+            isLoading: false,
+            routeName: 'Master'
+
+        }
+    },
+    created() {},
+    methods: {
+
+        goToPlay(cameraId) {
+            this.$router.push({
+                name: 'MasterLiveRoom',
+                query: {
+                    id: cameraId
+                }
+            })
+        },
+        goToPay() {
+
+            this.$router.push({
+                name: 'MasterLiveShow',
+            })
+        },
+        queryCameraList() {
+            this.isLoading = true;
+
+            API.queryCameraList({
+                //currentId:this.student_current_info.id
+            }).then(response => {
+                this.isLoading = false;
+
+                this.buystatus = response.buystatus;
+                if (this.buystatus) {
+                    this.list = response.list;
+                    this.endtime = response.endtime;
+                }
+                if (false) {
+
+                    this.$router.push({
+                        name: 'MasterLiveShow',
+                        query: {
+                            routeName: "Master"
+                        }
+                    })
+                }
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+        },
+        asynCallBack() {},
+    },
+    mounted() {
+        this.queryCameraList();
+    },
+
+    destroyed() {
+
+    },
+    computed: {
+        ...mapGetters({
+            openId: 'wx_openid',
+            token: 'token',
+            person_data: 'person_data',
+            person_popedom: 'person_popedom',
+        })
+    }
+}
 </script>
 
 <style scoped src="$project/assets/css/pension.css"></style>

+ 279 - 278
src/projects/pension/views/Master/Live/Room.vue

@@ -1,289 +1,290 @@
 <template>
 <div>
 
-	<common @asynCallBack="asynCallBack"></common>
-	<top-header :pageTitle="pageTitle"    ></top-header>
-
-	<div class="mui-content vongi-zbfj">
-				<div class="mui-content-padded">
-
-					<div class="fyy-video">
-						<!--未开播状态-->
-						 <div class="mui-media-body" v-if="!detail.status">
-							<img src="~$project/assets/img/gkke02.png" width="50"/>
-							<h6>该直播间未开播</h6>
-						</div>
-						<video autoplay controls class="video" ref="myPlayer">
-							<source :src="liveAddressUrl" type="application/x-mpegURL" />
-						</video>					</div>
-					<div class="mui-table-view-cell flew-sp">
-						{{detail.roomAddress}}
-						<span class="color4fc5f7">[{{detail.status=='1'?'在线':'离线'}}]</span>
-					</div>
-				</div>
-				<div class="mui-table-view-cell flew" v-if="detail.contactPhone">
-					紧急联系热线
-					<a class="mui-btn" :href="'tel:'+detail.contactPhone" >{{detail.contactPhone}}<span class="iconfont icon-ziyuan1"></span></a>
-				</div>
-			</div>
-			<!--挂机弹窗-->
-			 <div class="vongi-popup"  v-if="isLoading2">
-				<div class="vongi-popup-bg"></div>
-				<div class="vongi-popup-ceter vongi-zbfj-pop" style="top:10%">
-					<div class="vongi-popup-inner">
-						<div class="vongi-popup-ma">
-							<img src="~$project/assets/img/lad.png" width="50%"  v-if="banner==null">
-							<template v-if="banner!=null">
-
-
-								<template v-if="banner.linkUrl.indexOf('http:')==0">
-									<a :href="banner.linkUrl" class="linkurl">
-										<img :src="banner.picUrl" :alt="banner.name" width="50%">
-									</a>
-								</template>
-
-								<template v-if="banner.linkUrl.indexOf('http:')!=0">
-									<router-link :to="{name: banner.linkUrl}">
-										<img :src="banner.picUrl" :alt="banner.name" width="50%">
-									</router-link>
-								</template>
-
-							</template>
-							<h3>还在观看吗?</h3>
-
-						</div>
-						<div class="vongi-btn vongi-login-btn">
-							<button class="mui-btn mui-btn-pink" @click="mystart"><spn class="iconfont icon-bofang" ></spn>继续观看</button>
-							<button class="mui-btn " @click="myback"><spn class="iconfont icon-tuichu4"></spn>结束观看</button>
-						</div>
-					</div>
-
-				</div>
-			</div>
-	<loading :visible="isLoading"></loading>
+    <common @asynCallBack="asynCallBack"></common>
+    <top-header :pageTitle="pageTitle"></top-header>
+
+    <div class="mui-content vongi-zbfj">
+        <div class="mui-content-padded">
+
+            <div class="fyy-video">
+                <!--未开播状态-->
+                <div class="mui-media-body" v-if="!detail.status">
+                    <img src="~$project/assets/img/gkke02.png" width="50" />
+                    <h6>该直播间未开播</h6>
+                </div>
+                <video autoplay controls class="video" ref="myPlayer">
+                    <source :src="liveAddressUrl" type="application/x-mpegURL" />
+                </video>
+            </div>
+            <div class="mui-table-view-cell flew-sp">
+                {{detail.roomAddress}}
+                <span class="color4fc5f7">[{{detail.status=='1'?'在线':'离线'}}]</span>
+            </div>
+        </div>
+        <div class="mui-table-view-cell flew" v-if="detail.contactPhone">
+            紧急联系热线
+            <a class="mui-btn" :href="'tel:'+detail.contactPhone">{{detail.contactPhone}}<span class="iconfont icon-ziyuan1"></span></a>
+        </div>
+    </div>
+    <!--挂机弹窗-->
+    <div class="vongi-popup" v-if="isLoading2">
+        <div class="vongi-popup-bg"></div>
+        <div class="vongi-popup-ceter vongi-zbfj-pop" style="top:10%">
+            <div class="vongi-popup-inner">
+                <div class="vongi-popup-ma">
+                    <img src="~$project/assets/img/lad.png" width="50%" v-if="banner==null">
+                    <template v-if="banner!=null">
+
+                        <template v-if="banner.linkUrl.indexOf('http:')==0">
+                            <a :href="banner.linkUrl" class="linkurl">
+                                <img :src="banner.picUrl" :alt="banner.name" width="50%">
+                            </a>
+                        </template>
+
+                        <template v-if="banner.linkUrl.indexOf('http:')!=0">
+                            <router-link :to="{name: banner.linkUrl}">
+                                <img :src="banner.picUrl" :alt="banner.name" width="50%">
+                            </router-link>
+                        </template>
+
+                    </template>
+                    <h3>还在观看吗?</h3>
+
+                </div>
+                <div class="vongi-btn vongi-login-btn">
+                    <button class="mui-btn mui-btn-pink" @click="mystart">
+                        <spn class="iconfont icon-bofang"></spn>继续观看
+                    </button>
+                    <button class="mui-btn " @click="myback">
+                        <spn class="iconfont icon-tuichu4"></spn>结束观看
+                    </button>
+                </div>
+            </div>
+
+        </div>
+    </div>
+    <loading :visible="isLoading"></loading>
 
 </div>
 </template>
 
-
 <script>
-	import * as API_Common from '$project/apis/common'
-
-	import * as API  from '@/apis/Master/live'
-	import Common from '$project/components/Common.vue'
-	import Loading from '$project/components/Loading.vue'
-	import TopHeader from '$project/components/TopHeader.vue'
-	import Hls from 'hls.js'
-
-	import {
-		mapGetters,
-		mapMutations
-	} from 'vuex'
-	import {
-		currentTimeStamp,
-		parseUnixTime
-	} from '$project/utils'
-	export default {
-		name: 'MasterLiveRoom',
-		components: {
-			Common,
-			Loading,
-			TopHeader
-		},
-		data() {
-			return {
-				pageTitle: '视频看护直播间',
-				id: this.$route.query.id,
-				detail: {
-					status: 0
-				},
-
-				liveAddressUrl: "",
-				player: {},
-				list: [],
-				isLoading: false,
-				sz: ["", "一", "二", "三", "四", "五", "六", "日"],
-				plan: "",
-				planshow: false,
-				hls: null,
-				setTimeoutId:null,
-				isLoading2:false,
-				isLoading3:false,
-				banner:null,
-				serverList: [],
-				bannerList:[],
-			}
-		},
-		created() {
-			this.id = this.$route.query.id;
-		},
-		methods:  {
-			getBannerInfo() {
-
-				API_Common.getBannerInfo("4").then(response => {
-					//this.bannerList = response;
-					for (var i in response) {
-						var mod = response[i];
-						this.bannerList.push(mod);
-
-					}
-
-					if(this.bannerList.length>0){
-						var x=Math.floor(Math.random()*this.bannerList.length);
-						this.banner=this.bannerList[x];
-					}
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-
-			},myback(){
-				this.$router.push({
-					name: 'Master',
-				})
-			},
-			mystart(){
-				if(this.isLoading3){
-					window.location.reload();
-				}else{
-					this.player.play() //开始
-					this.isLoading2=false;
-				}
-
-			},	handlePlay() {
-
-				console.log("开始播放");
-				if(this.player!=null){
-					clearTimeout(this.setTimeoutId)
-					this.setTimeoutId=setTimeout(()=> {
-						console.log("延迟暂停");
-
-						this.player.pause() //暂停
-
-						if(document.exitFullscreen) {
-							document.exitFullscreen();
-						} else if(document.mozCancelFullScreen) {
-							document.mozCancelFullScreen();
-						} else if(document.webkitCancelFullScreen) {
-							document.webkitCancelFullScreen();
-						} else if(document.msExitFullscreen) {
-							document.msExitFullscreen();
-						}
-
-						this.isLoading2=true;
-						if(this.banner!=null){
-							var x=Math.floor(Math.random()*this.bannerList.length);
-							this.banner=this.bannerList[x];
-							console.log(this.bannerList)
-							console.log(x)
-						}else{
-							this.getBannerInfo();
-						}
-
-						setTimeout(()=> {
-							if(this.isLoading2){
-								this.hls.stopLoad();
-								this.isLoading3=true;//需要刷新;
-							}
-						},1000*60*1)
-
-					},1000*60*10)
-				}
-
-			},
-
-			getplan(mod) {
-				return "每周" + this.sz[mod.week] + mod.startTime + '-' + mod.endTime + "开播";
-			},
-
-			play() {
-				this.liveAddressUrl = this.liveAddressUrl.replace("http:", "https:");
-
-				this.player = this.$refs["myPlayer"];
-
-
-				var userAgent = navigator.userAgent;
-
-				if (/(iPhone|iPad|iPod|iOS)/i.test(userAgent)) {
-					//this.player.play();
-					console.log("ios原生支持播放m3u8!");
-				} else {
-					this.player.addEventListener('play', this.handlePlay);
-
-					var hls = new Hls();
-					hls.loadSource(this.liveAddressUrl);
-					hls.attachMedia(this.player);
-
-					hls.on(Hls.Events.MANIFEST_PARSED, () => {
-						this.player.play();
-					});
-					this.hls = hls;
-				}
-
-			},
-			cameraDetail(){
-				var week = new Date().getDay();
-				if (week == 0) {
-					week = 7;
-				}
-				this.isLoading = true;
-				API.cameraDetail({
- 					id:this.id
-				}).then(response => {
-
-					this.isLoading = false;
-
-					this.detail = response.detail;
-					var text = this.detail.roomAddress + "(" + this.detail.deviceSerial + ")";
-
-
-
-
-					if (this.detail.status&& response.json) {
-						//this.liveAddressUrl = response.json.hdAddress;
-						this.liveAddressUrl = response.json.liveAddress;
-						this.play();
-					} else {
-						this.isLoading = false;
-					}
-				}).catch(error => {
-					this.isLoading = false;
-					mui.toast(error);
-				})
-			},asynCallBack(){},
-		},
-		mounted() {
-			console.log("open class living...");
-			this.cameraDetail();
-
-		},
-
-
-		destroyed() {
-			this.liveAddressUrl = "";
-
-			console.log("页面销毁");
-			if (this.$refs["myPlayer"] != null) {
-				//this.player.dispose()
-				this.$refs["myPlayer"].pause() //暂停
-				this.$refs["myPlayer"].dispose() //销毁
-				console.log("关闭视频流");
-			}
-			if (this.hls != null) {
-				this.hls.destroy()
-				this.hls.loadSource(this.liveAddressUrl);
-
-			}
-		},
-		computed: {
-			...mapGetters({
-				openId: 'wx_openid',
-				token: 'token',
-				person_data: 'person_data',
-				person_popedom: 'person_popedom',
-			})
-		}
-	}
+import * as API_Common from '$project/apis/common'
+
+import * as API from '@/apis/Master/live'
+import Common from '$project/components/Common.vue'
+import Loading from '$project/components/Loading.vue'
+import TopHeader from '$project/components/TopHeader.vue'
+import Hls from 'hls.js'
+
+import {
+    mapGetters,
+    mapMutations
+} from 'vuex'
+import {
+    currentTimeStamp,
+    parseUnixTime
+} from '$project/utils'
+export default {
+    name: 'MasterLiveRoom',
+    components: {
+        Common,
+        Loading,
+        TopHeader
+    },
+    data() {
+        return {
+            pageTitle: '视频看护直播间',
+            id: this.$route.query.id,
+            detail: {
+                status: 0
+            },
+
+            liveAddressUrl: "",
+            player: {},
+            list: [],
+            isLoading: false,
+            sz: ["", "一", "二", "三", "四", "五", "六", "日"],
+            plan: "",
+            planshow: false,
+            hls: null,
+            setTimeoutId: null,
+            isLoading2: false,
+            isLoading3: false,
+            banner: null,
+            serverList: [],
+            bannerList: [],
+        }
+    },
+    created() {
+        this.id = this.$route.query.id;
+    },
+    methods: {
+        getBannerInfo() {
+
+            API_Common.getBannerInfo("4").then(response => {
+                //this.bannerList = response;
+                for (var i in response) {
+                    var mod = response[i];
+                    this.bannerList.push(mod);
+
+                }
+
+                if (this.bannerList.length > 0) {
+                    var x = Math.floor(Math.random() * this.bannerList.length);
+                    this.banner = this.bannerList[x];
+                }
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+
+        },
+        myback() {
+            this.$router.push({
+                name: 'Master',
+            })
+        },
+        mystart() {
+            if (this.isLoading3) {
+                window.location.reload();
+            } else {
+                this.player.play() //开始
+                this.isLoading2 = false;
+            }
+
+        },
+        handlePlay() {
+
+            console.log("开始播放");
+            if (this.player != null) {
+                clearTimeout(this.setTimeoutId)
+                this.setTimeoutId = setTimeout(() => {
+                    console.log("延迟暂停");
+
+                    this.player.pause() //暂停
+
+                    if (document.exitFullscreen) {
+                        document.exitFullscreen();
+                    } else if (document.mozCancelFullScreen) {
+                        document.mozCancelFullScreen();
+                    } else if (document.webkitCancelFullScreen) {
+                        document.webkitCancelFullScreen();
+                    } else if (document.msExitFullscreen) {
+                        document.msExitFullscreen();
+                    }
+
+                    this.isLoading2 = true;
+                    if (this.banner != null) {
+                        var x = Math.floor(Math.random() * this.bannerList.length);
+                        this.banner = this.bannerList[x];
+                        console.log(this.bannerList)
+                        console.log(x)
+                    } else {
+                        this.getBannerInfo();
+                    }
+
+                    setTimeout(() => {
+                        if (this.isLoading2) {
+                            this.hls.stopLoad();
+                            this.isLoading3 = true; //需要刷新;
+                        }
+                    }, 1000 * 60 * 1)
+
+                }, 1000 * 60 * 10)
+            }
+
+        },
+
+        getplan(mod) {
+            return "每周" + this.sz[mod.week] + mod.startTime + '-' + mod.endTime + "开播";
+        },
+
+        play() {
+            this.liveAddressUrl = this.liveAddressUrl.replace("http:", "https:");
+
+            this.player = this.$refs["myPlayer"];
+
+            var userAgent = navigator.userAgent;
+
+            if (/(iPhone|iPad|iPod|iOS)/i.test(userAgent)) {
+                //this.player.play();
+                console.log("ios原生支持播放m3u8!");
+            } else {
+                this.player.addEventListener('play', this.handlePlay);
+
+                var hls = new Hls();
+                hls.loadSource(this.liveAddressUrl);
+                hls.attachMedia(this.player);
+
+                hls.on(Hls.Events.MANIFEST_PARSED, () => {
+                    this.player.play();
+                });
+                this.hls = hls;
+            }
+
+        },
+        cameraDetail() {
+            var week = new Date().getDay();
+            if (week == 0) {
+                week = 7;
+            }
+            this.isLoading = true;
+            API.cameraDetail({
+                id: this.id
+            }).then(response => {
+
+                this.isLoading = false;
+
+                this.detail = response.detail;
+                var text = this.detail.roomAddress + "(" + this.detail.deviceSerial + ")";
+
+                if (this.detail.status && response.json) {
+                    //this.liveAddressUrl = response.json.hdAddress;
+                    this.liveAddressUrl = response.json.liveAddress;
+                    this.play();
+                } else {
+                    this.isLoading = false;
+                }
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
+        },
+        asynCallBack() {},
+    },
+    mounted() {
+        console.log("open class living...");
+        this.cameraDetail();
+
+    },
+
+    destroyed() {
+        this.liveAddressUrl = "";
+
+        console.log("页面销毁");
+        if (this.$refs["myPlayer"] != null) {
+            //this.player.dispose()
+            this.$refs["myPlayer"].pause() //暂停
+            this.$refs["myPlayer"].dispose() //销毁
+            console.log("关闭视频流");
+        }
+        if (this.hls != null) {
+            this.hls.destroy()
+            this.hls.loadSource(this.liveAddressUrl);
+
+        }
+    },
+    computed: {
+        ...mapGetters({
+            openId: 'wx_openid',
+            token: 'token',
+            person_data: 'person_data',
+            person_popedom: 'person_popedom',
+        })
+    }
+}
 </script>
 
 <style scoped src="$project/assets/css/pension.css"></style>

+ 84 - 86
src/projects/pension/views/Master/Live/Show.vue

@@ -2,7 +2,7 @@
 <div>
 
     <common @asynCallBack="asynCallBack"></common>
-    <top-header :pageTitle="pageTitle"  :routeName="routeName"  ></top-header>
+    <top-header :pageTitle="pageTitle" :routeName="routeName"></top-header>
 
     <div class="mui-content vongi-spkh-show margin60">
         <img src="~$project/assets/img/show01.png" />
@@ -11,101 +11,99 @@
         <img src="~$project/assets/img/show04.png" />
         <img src="~$project/assets/img/show05.png" />
     </div>
-    <div class="fyy-footer">
-      <div class="bindfyy-btn">
-        <button type="submit" class="mui-btn mui-btn-pink"   @click="toPay()" v-text="paytext">立即开通</button>
-      </div>
+    <div class="fyy-footer" v-if="false">
+        <div class="bindfyy-btn">
+            <button type="submit" class="mui-btn mui-btn-pink" @click="toPay()" v-text="paytext">立即开通</button>
+        </div>
     </div>
     <loading :visible="isLoading"></loading>
 
 </div>
 </template>
 
-
 <script>
-
-    import * as API  from '@/apis/Master/live'
-    import Common from '$project/components/Common.vue'
-    import Loading from '$project/components/Loading.vue'
-    import TopHeader from '$project/components/TopHeader.vue'
-    import {
-        mapGetters,
-        mapMutations
-    } from 'vuex'
-    import {
-        currentTimeStamp,
-        parseUnixTime
-    } from '$project/utils'
-    export default {
-        name: 'MasterLiveShow',
-        components: {
-            Common,
-            Loading,
-            TopHeader
-        },
-        data() {
-            return {
-                pageTitle: '产品介绍',
-                routeName: "MasterLiveInfo",
-
-                isLoading: false,
-                 paytext: "点击购买",
-                orderId: null,
-                id: this.$route.query.id,
-
-                detail: {
-                    order: {},
-                    info: null,
-                    list: []
-                },
-            }
-        },
-        created() {
-             //接收参数来实现返回的页面是哪一种
-            if (this.$route.query.routeName) {
-                this.routeName = this.$route.query.routeName;
-            }
-        },
-        methods:  {
-
-            toPay() {
-                this.isLoading = true;
-
-                API.submit({
-                    "personId": this.person_data.id,
-                    "payPersonId": this.person_data.id,
-                    "goodsId":"1",
-                }).then(data => {
-
-                    var url = window.location.href.split("#")[0];
-                    var param = JSON.stringify(data).replace("{", "").replace("}", "").replace(/\",\"/g, "&").replace(/,\"/g, "&").replace(
-                        /:/g, "=").replace(/\":\"/g, "=").replace(/\"/g, "");
-                    param = param.replace('=//', '://');
-                    window.location = url + "?#/master/live/pay?" + param;
-
-                }).catch(error => {
-                    this.isLoading = false;
-                    mui.toast(error);
-                })
-
-
-            },asynCallBack(){},
-        },
-        mounted() {
-
-         },
-        destroyed() {
+import * as API from '@/apis/Master/live'
+import Common from '$project/components/Common.vue'
+import Loading from '$project/components/Loading.vue'
+import TopHeader from '$project/components/TopHeader.vue'
+import {
+    mapGetters,
+    mapMutations
+} from 'vuex'
+import {
+    currentTimeStamp,
+    parseUnixTime
+} from '$project/utils'
+export default {
+    name: 'MasterLiveShow',
+    components: {
+        Common,
+        Loading,
+        TopHeader
+    },
+    data() {
+        return {
+            pageTitle: '产品介绍',
+            routeName: "MasterLiveInfo",
+
+            isLoading: false,
+            paytext: "点击购买",
+            orderId: null,
+            id: this.$route.query.id,
+
+            detail: {
+                order: {},
+                info: null,
+                list: []
+            },
+        }
+    },
+    created() {
+        //接收参数来实现返回的页面是哪一种
+        if (this.$route.query.routeName) {
+            this.routeName = this.$route.query.routeName;
+        }
+    },
+    methods: {
+
+        toPay() {
+            this.isLoading = true;
+
+            API.submit({
+                "personId": this.person_data.id,
+                "payPersonId": this.person_data.id,
+                "goodsId": "1",
+            }).then(data => {
+
+                var url = window.location.href.split("#")[0];
+                var param = JSON.stringify(data).replace("{", "").replace("}", "").replace(/\",\"/g, "&").replace(/,\"/g, "&").replace(
+                    /:/g, "=").replace(/\":\"/g, "=").replace(/\"/g, "");
+                param = param.replace('=//', '://');
+                window.location = url + "?#/master/live/pay?" + param;
+
+            }).catch(error => {
+                this.isLoading = false;
+                mui.toast(error);
+            })
 
         },
-        computed: {
-            ...mapGetters({
-                openId: 'wx_openid',
-                token: 'token',
-                person_data: 'person_data',
-                person_popedom: 'person_popedom',
-            })
-        }
+        asynCallBack() {},
+    },
+    mounted() {
+
+    },
+    destroyed() {
+
+    },
+    computed: {
+        ...mapGetters({
+            openId: 'wx_openid',
+            token: 'token',
+            person_data: 'person_data',
+            person_popedom: 'person_popedom',
+        })
     }
+}
 </script>
 
 <style scoped src="$project/assets/css/pension.css"></style>

+ 44 - 0
src/projects/pension/views/Master/Relatives/PhoneInfo.vue

@@ -1,8 +1,52 @@
 <template>
+<div>
+    <header class="mui-bar mui-bar-nav">
+				<h1 class="mui-title">联系人</h1>
+				<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
+			</header>
+			<div class="mui-content vongi-tell">
+				<div class="vongi-center">
+					<div class="mui-media-object"><img src="~$project/assets/img/03.jpg" width="50" /></div>
+					<h1>赵刚</h1>
+				</div>
+				<div class='flew-sp mui-h1'>
+					15500001111<span class="iconfont icon-ziyuan1 color55f868"></span>
+				</div>
+			</div>
+			<div class="fyy-footer">
+				<ul class="mui-table-view mui-grid-view mui-grid-9">
+					<li class="mui-table-view-cell mui-media mui-col-xs-6">
+						<a href="#">
+							<span class="mui-icon iconfont icon-xinbaniconshangchuan-"></span>
+							<div class="mui-media-body">编辑联系人</div>
+						</a>
+					</li>
+					<li class="mui-table-view-cell mui-media mui-col-xs-6">
+						<a href="#">
+							<span class="mui-icon iconfont icon-guanbi"></span>
+							<div class="mui-media-body">删除联系人</div>
+						</a>
+					</li>
+				</ul>
+			</div>
+</div>
 </template>
 
 <script>
+export default {
+        name: 'Login',
+        components: {},
+        mounted() {
+            document.body.style.backgroundColor = '#fff';
+        },
+        destroyed() {
+            document.body.style.backgroundColor = '';
+            }
+    }
 </script>
 
+<style scoped src="$project/assets/css/pension.css"></style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style src="$project/assets/css/iconfont.css"></style>
 <style>
 </style>

+ 26 - 0
src/projects/pension/views/Master/Relatives/PhoneList.vue

@@ -1,8 +1,34 @@
 <template>
+<div>
+    <header class="mui-bar mui-bar-nav">
+			<h1 class="mui-title">联系人</h1>
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
+		</header>
+		<div class="mui-content vongi-qqhm">
+			<ul class="mui-table-view">
+				<li class="mui-table-view-cell">
+					<a class="mui-navigate-right" href="#">
+						<h1>赵双龙</h1>
+					</a>
+				</li>
+				<li class="mui-table-view-cell">
+					<a class="mui-navigate-right" href="#">
+						<h1>赵双龙</h1>
+					</a>
+				</li>
+			</ul>
+		</div>
+		<div class="fyy-footer">
+			<div class="bindfyy-btn"><button type="submit" class="mui-btn mui-btn-pink ">添加联系人</button></div>
+		</div>
+</div>
 </template>
 
 <script>
 </script>
 
+<style scoped src="$project/assets/css/pension.css"></style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style src="$project/assets/css/iconfont.css"></style>
 <style>
 </style>

+ 29 - 0
src/projects/pension/views/Master/Relatives/PhoneSave.vue

@@ -1,8 +1,37 @@
 <template>
+<div>
+    <header class="mui-bar mui-bar-nav">
+			<h1 class="mui-title">编辑联系人</h1>
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
+		</header>
+		<div class="mui-content">			
+			<div class="mui-content-padded vongi-qingjiadt vongi-editme">
+				<form class="mui-input-group">
+					<div class="mui-input-row">
+						<label>姓名<i class="colorfe616c">*</i></label>
+						<!--<input type="text" class="mui-input-clear" placeholder="请填写联系人姓名">-->
+						<span>赵刚</span>
+					</div>
+					<div class="mui-input-row">
+						<label>手机号码<i class="colorfe616c">*</i></label>
+						<!--<input type="text" class="mui-input-clear" placeholder="请填写联系人手机号码">-->
+						<span>15500001111</span>
+					</div>
+				</form>
+			</div>
+			<div class="vongi-btn vongi-login-btn">
+				<button class="mui-btn mui-btn-pink">保  存</button>
+				<button class="mui-btn mui-btn-danger mui-btn-outlined">删除联系人</button>
+			</div>			
+		</div>
+</div>
 </template>
 
 <script>
 </script>
 
+<style scoped src="$project/assets/css/pension.css"></style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style src="$project/assets/css/iconfont.css"></style>
 <style>
 </style>