he2802 3 vuotta sitten
vanhempi
commit
63aa14747e
4 muutettua tiedostoa jossa 10 lisäystä ja 15 poistoa
  1. 6 3
      pages/index/index.vue
  2. 2 4
      pages2/class/detail.vue
  3. 1 0
      pages2/plan/index.vue
  4. 1 8
      pages2/verify/input2.vue

+ 6 - 3
pages/index/index.vue

@@ -167,7 +167,8 @@ export default {
 			],
 			list1: [],
 			list2: [],
-			isLogin:false
+			isLogin:false,
+			isOld:false
 		};
 	},
 	onPullDownRefresh() {},
@@ -177,10 +178,12 @@ export default {
 		this.bankList();
 	},
 	onShow() {
-		if(this.isLogin!=this.$method.isLogin()){
+		if (uni.getStorageSync('updateHome')|| !this.isOld){
+			this.isOld = true;
 			this.init()
-			this.isLogin = this.$method.isLogin()
+			uni.removeStorageSync('updateHome'); //消费首页刷新事件
 		}
+		
 		if(this.isLogin){
 			this.$store.state.allowLoading = false;
 			this.$api.getinfoAttached().then(res => {

+ 2 - 4
pages2/class/detail.vue

@@ -386,7 +386,7 @@ export default {
 		    })
 		  },
 		openJY(){
-			this.openPhoto();
+		//	this.openPhoto();
 	//		this.getCameraSetting()
 			/* wx.openSetting({
 			      success (res) {
@@ -564,6 +564,7 @@ export default {
 			}
 			console.log('提交接口', data);
 			this.$api.studyRecord(data).then(res => {
+				self.ossAvatarUrl = ''
 				console.log(res);
 			});
 		},
@@ -696,9 +697,6 @@ export default {
 				this.postStudyRecord() */
 			}
 			if (newstate.detail.newstate == 'ended') {
-				setTimeout(function(){
-					this.ossAvatarUrl = '';
-				}, 2000)
 				this.postStudyRecord(1);
 			}
 		},

+ 1 - 0
pages2/plan/index.vue

@@ -212,6 +212,7 @@ export default {
 			};
 			let self = this;
 			this.$api.editsystemplan(data).then(res => {
+				uni.setStorageSync('updateHome',1)
 				self.getList();
 			});
 		},

+ 1 - 8
pages2/verify/input2.vue

@@ -114,7 +114,7 @@ export default {
 							const filePath = result.tempFilePath
 							console.log(this.$method.splitImgHost(res.data.msg));
 							this.$method.showToast('下载成功');
-							uni.saveVideoToPhotosAlbum({
+							uni.saveImageToPhotosAlbum({
 								filePath: filePath,
 								success: function (errMsg) {
 								uni.showToast({
@@ -132,13 +132,6 @@ export default {
 													
 									}
 								});     
-							/* uni.openDocument({
-							    filePath: filePath,
-							    fileType:'doc',
-							    showMenu:true,
-							    success: function (res) {
-							    }
-							  }) */
 						}
 					}
 				});