Преглед на файлове

Merge remote-tracking branch 'origin/master'

wgl преди 4 години
родител
ревизия
82916b5f2b
променени са 1 файла, в които са добавени 15 реда и са изтрити 5 реда
  1. 15 5
      src/projects/business/views/Guest/Current/List.vue

+ 15 - 5
src/projects/business/views/Guest/Current/List.vue

@@ -1,6 +1,6 @@
 <template>
 <div>
-    <common  ></common>
+    <common @asynCallBack="asynCallBack" ></common>
 
     <header class="mui-bar mui-bar-nav" >
         <h1 class="mui-title">拜访申请记录</h1>
@@ -35,9 +35,10 @@
 
 
 		</div>
-	<NullList :remark="'暂无拜访记录'" v-if="!recordList.length"></NullList>
+	<NullList :remark="'暂无拜访记录'" v-if="!recordList.length&&openId"></NullList>
+    <NullList :remark="'请使用微信扫描二维码'" v-if="!recordList.length&&!openId"></NullList>
 
-	<div class="fyy-footer" v-if="id">
+	<div class="fyy-footer" v-if="id&&openId">
 			<div class="bindfyy-btn">
 				<button type="button" class="mui-btn mui-btn-primary " @click="save">
                     我要拜访
@@ -116,7 +117,7 @@
 			},
 			//获取列表
 			getList() {
-				this.isLoading = true;
+
                 this.listForm.openId=this.openId;
                 API_Current.pageList(this.listForm).then(response => {
 					if (response) {
@@ -151,11 +152,20 @@
 			},
 
 			asynCallBack() {
+                if(!this.openId){
+                    this.isLoading = false;
+                    mui.toast("请使用微信扫描二维码,关注公众号【小鹏管家】")
+                }else if(!this.id){
+                    this.isLoading = false;
+                    mui.toast("请通过扫描二维码访问本页面")
+                }else{
+                    this.getList();
+                }
 
 			},
 		},
 		mounted() {
-			this.getList();
+            this.isLoading = true;
 			//监控下拉加载事件
 			var _this = this;
 			window.addEventListener('scroll', _this.handleScrool);