刷新视频数据
This commit is contained in:
		
							parent
							
								
									043f7ec39b
								
							
						
					
					
						commit
						234416dbab
					
				@ -1042,6 +1042,7 @@ export default {
 | 
				
			|||||||
			this.page = 1;
 | 
								this.page = 1;
 | 
				
			||||||
			this.dataList = [];
 | 
								this.dataList = [];
 | 
				
			||||||
			this.k = 0;
 | 
								this.k = 0;
 | 
				
			||||||
 | 
								this.userId = '';
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		async get() {
 | 
							async get() {
 | 
				
			||||||
			// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
								// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
				
			||||||
 | 
				
			|||||||
@ -1048,6 +1048,7 @@ export default {
 | 
				
			|||||||
			this.page = 1;
 | 
								this.page = 1;
 | 
				
			||||||
			this.dataList = [];
 | 
								this.dataList = [];
 | 
				
			||||||
			this.k = 0;
 | 
								this.k = 0;
 | 
				
			||||||
 | 
								this.userId = '';
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		async get() {
 | 
							async get() {
 | 
				
			||||||
			// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
								// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
				
			||||||
 | 
				
			|||||||
@ -1049,6 +1049,7 @@ export default {
 | 
				
			|||||||
			this.page = 1;
 | 
								this.page = 1;
 | 
				
			||||||
			this.dataList = [];
 | 
								this.dataList = [];
 | 
				
			||||||
			this.k = 0;
 | 
								this.k = 0;
 | 
				
			||||||
 | 
								this.userId = '';
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		async get() {
 | 
							async get() {
 | 
				
			||||||
			// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
								// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@
 | 
				
			|||||||
	"sassImplementationName": "node-sass",
 | 
						"sassImplementationName": "node-sass",
 | 
				
			||||||
	"app-plus": {
 | 
						"app-plus": {
 | 
				
			||||||
		"android": {
 | 
							"android": {
 | 
				
			||||||
			"versionCode": 404, // Android 版本号
 | 
								"versionCode": 405, // Android 版本号
 | 
				
			||||||
			"versionName": "4.0.0" // 用户看到的版本号
 | 
								"versionName": "4.0.0" // 用户看到的版本号
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		"compatible": {
 | 
							"compatible": {
 | 
				
			||||||
 | 
				
			|||||||
@ -1046,6 +1046,7 @@ export default {
 | 
				
			|||||||
			this.page = 1;
 | 
								this.page = 1;
 | 
				
			||||||
			this.dataList = [];
 | 
								this.dataList = [];
 | 
				
			||||||
			this.k = 0;
 | 
								this.k = 0;
 | 
				
			||||||
 | 
								this.userId = '';
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		async get() {
 | 
							async get() {
 | 
				
			||||||
			// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
								// 这个方法主要就是用来第一次进入视频播放时用来处理的
 | 
				
			||||||
 | 
				
			|||||||
@ -201,9 +201,17 @@ export default {
 | 
				
			|||||||
					code: 'APPLE'
 | 
										code: 'APPLE'
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			],
 | 
								],
 | 
				
			||||||
			initurl: false
 | 
								initurl: false,
 | 
				
			||||||
 | 
								channelComment: null
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						destroyed() {
 | 
				
			||||||
 | 
							console.log('登录面销毁');
 | 
				
			||||||
 | 
							// 销毁时关闭 BroadcastChannel
 | 
				
			||||||
 | 
							if (this.channelComment) {
 | 
				
			||||||
 | 
								this.channelComment.close();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	onShow() {
 | 
						onShow() {
 | 
				
			||||||
		//#ifdef H5
 | 
							//#ifdef H5
 | 
				
			||||||
@ -342,6 +350,7 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	onLoad(options) {
 | 
						onLoad(options) {
 | 
				
			||||||
 | 
							this.channelComment = new BroadcastChannel('comment-counts');
 | 
				
			||||||
		if (options.init == 'index') {
 | 
							if (options.init == 'index') {
 | 
				
			||||||
			this.initurl = true;
 | 
								this.initurl = true;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@ -564,7 +573,11 @@ export default {
 | 
				
			|||||||
					storage.setVlogToken(vlogInfo.userToken);
 | 
										storage.setVlogToken(vlogInfo.userToken);
 | 
				
			||||||
					storage.setVlogUserInfo(vlogInfo);
 | 
										storage.setVlogUserInfo(vlogInfo);
 | 
				
			||||||
					storage.setRefreshVlogIndex('1');
 | 
										storage.setRefreshVlogIndex('1');
 | 
				
			||||||
 | 
										// 刷新videoList
 | 
				
			||||||
 | 
										this.channelComment.postMessage({
 | 
				
			||||||
 | 
											type: 'comment-counts',
 | 
				
			||||||
 | 
											data: { lahei: true }
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
					/**
 | 
										/**
 | 
				
			||||||
					 * 登录成功后获取个人信息
 | 
										 * 登录成功后获取个人信息
 | 
				
			||||||
					 */
 | 
										 */
 | 
				
			||||||
@ -574,6 +587,7 @@ export default {
 | 
				
			|||||||
							/**
 | 
												/**
 | 
				
			||||||
							 * 个人信息存储到缓存userInfo中
 | 
												 * 个人信息存储到缓存userInfo中
 | 
				
			||||||
							 */
 | 
												 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							storage.setUserInfo(user.data.result);
 | 
												storage.setUserInfo(user.data.result);
 | 
				
			||||||
							storage.setHasLogin(true);
 | 
												storage.setHasLogin(true);
 | 
				
			||||||
							// loginIm
 | 
												// loginIm
 | 
				
			||||||
 | 
				
			|||||||
@ -215,17 +215,14 @@ export default {
 | 
				
			|||||||
			// this.$refs[prop].showVd();
 | 
								// this.$refs[prop].showVd();
 | 
				
			||||||
			console.log('是否刷新:' + storage.getRefreshVlogIndex());
 | 
								console.log('是否刷新:' + storage.getRefreshVlogIndex());
 | 
				
			||||||
			if (storage.getRefreshVlogIndex() === '1') {
 | 
								if (storage.getRefreshVlogIndex() === '1') {
 | 
				
			||||||
				try {
 | 
					 | 
				
			||||||
					storage.setRefreshVlogIndex('0'); //初始完数据修改状态不需要刷新
 | 
					 | 
				
			||||||
					console.log('是否刷新:' + storage.getRefreshVlogIndex());
 | 
					 | 
				
			||||||
				// 登录后需要刷新数据
 | 
									// 登录后需要刷新数据
 | 
				
			||||||
				for (var i = 0; i < this.pageList.length; i++) {
 | 
									for (var i = 0; i < this.pageList.length; i++) {
 | 
				
			||||||
 | 
										if (this.$refs[i]) {
 | 
				
			||||||
						this.$refs[i].dataList = []; //所有数据清空
 | 
											this.$refs[i].dataList = []; //所有数据清空
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					this.$refs[prop].get(); //只初始化当前所在位置的数据
 | 
					 | 
				
			||||||
				} catch (err) {
 | 
					 | 
				
			||||||
					console.log(err + '255');
 | 
					 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									this.$refs[prop].get(); //只初始化当前所在位置的数据
 | 
				
			||||||
 | 
									storage.setRefreshVlogIndex('0'); //初始完数据修改状态不需要刷新
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				try {
 | 
									try {
 | 
				
			||||||
					this.$refs[prop].showVd();
 | 
										this.$refs[prop].showVd();
 | 
				
			||||||
@ -241,8 +238,10 @@ export default {
 | 
				
			|||||||
		if (storage.getRefreshVlogIndex() == '1') {
 | 
							if (storage.getRefreshVlogIndex() == '1') {
 | 
				
			||||||
			// 登录后需要刷新数据
 | 
								// 登录后需要刷新数据
 | 
				
			||||||
			for (var i = 0; i < this.pageList.length; i++) {
 | 
								for (var i = 0; i < this.pageList.length; i++) {
 | 
				
			||||||
 | 
									if (this.$refs[i]) {
 | 
				
			||||||
					this.$refs[i].dataList = []; //所有数据清空
 | 
										this.$refs[i].dataList = []; //所有数据清空
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			this.$refs[prop].get(); //只初始化当前所在位置的数据
 | 
								this.$refs[prop].get(); //只初始化当前所在位置的数据
 | 
				
			||||||
			storage.setRefreshVlogIndex('0'); //初始完数据修改状态不需要刷新
 | 
								storage.setRefreshVlogIndex('0'); //初始完数据修改状态不需要刷新
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -11,9 +11,7 @@
 | 
				
			|||||||
    "com.tencent.timpush:xiaomi:8.5.6864",
 | 
					    "com.tencent.timpush:xiaomi:8.5.6864",
 | 
				
			||||||
    "com.tencent.timpush:oppo:8.5.6864",
 | 
					    "com.tencent.timpush:oppo:8.5.6864",
 | 
				
			||||||
    "com.tencent.timpush:meizu:8.5.6864",
 | 
					    "com.tencent.timpush:meizu:8.5.6864",
 | 
				
			||||||
		"com.tencent.timpush:fcm:8.5.6864",
 | 
					    "com.tencent.timpush:fcm:8.5.6864"
 | 
				
			||||||
		"com.tencent.timpush:honor:8.5.6864",
 | 
					 | 
				
			||||||
		"com.tencent.timpush:vivo:8.5.6864"
 | 
					 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "project": {
 | 
					  "project": {
 | 
				
			||||||
    "plugins": [
 | 
					    "plugins": [
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user