Browse Source

Merge branch 'master' into stage-4

chenxiong 3 năm trước cách đây
mục cha
commit
11f849a402

+ 2 - 4
pages/index/index.vue

@@ -5,7 +5,7 @@
 				<image  src="/static/logo2.png"></image>
 			</view>
 		</u-navbar>
-		<!-- <u-swiper :list="list" @change="e => current = e.current" :autoplay="false"></u-swiper> -->
+		<u-swiper height="320" border-radius="0" :list="list" @change="e => current = e.current" :autoplay="false"></u-swiper>
 		<view class="content">
 			<view class="notice" v-if="infoNums">
 				<image src="/static/icon/msg_icon1.png" class="icon"></image>
@@ -127,9 +127,7 @@ export default {
 		return {
 			infoNums:0,
 			list:[
-				'https://cdn.uviewui.com/uview/swiper/swiper3.png',
-				'https://cdn.uviewui.com/uview/swiper/swiper2.png',
-				'https://cdn.uviewui.com/uview/swiper/swiper1.png',
+				'https://file.xyyxt.net/oss/images/file/20220111.jpg',
 			],
 			tabCurrent:0,
 			date:['日','一','二','三','四','五','六'],

+ 2 - 1
pages/login/login.vue

@@ -280,7 +280,8 @@ export default {
 						}
 					);
 				} else {
-					this.$refs.tel.onFieldBlur()
+					
+					this.$refs.tel.onFieldChange()
 				}
 			}
 			

+ 1 - 1
pages2/class/detail.vue

@@ -344,7 +344,7 @@ export default {
 	},
 	onUnload() {
 		if (this.playSectionId > 0) {
-			console.log(234234)
+			
 			//退出提交记录
 			this.ossAvatarUrl = '';
 			this.postStudyRecord();

+ 28 - 9
pages2/msg/detail.vue

@@ -118,9 +118,9 @@ export default {
 					});
 					break;
 				case 20:
-				this.$navTo.togo('/pages2/course/detail', {
-					id: item.goodsId
-				});
+					this.$navTo.togo('/pages2/course/detail', {
+						id: item.goodsId
+					});
 					break;
 				default:
 					break;
@@ -171,7 +171,7 @@ export default {
 		getInfo() {
 			this.$api.getappinformUserId(this.id).then(res => {
 				if (res.data.code === 200) {
-					if (res.data.data.receiptStatus === 1 && (res.data.data.remindId === 2 || res.data.data.remindId === 4 ||res.data.data.remindId === 24)) {
+					if (res.data.data.receiptStatus === 1 && (res.data.data.remindId === 2 || res.data.data.remindId === 4 || res.data.data.remindId === 24)) {
 						this.$api.getbaseprofiletpgetInfo({ goodsId: res.data.data.goodsId }).then(k => {
 							if ((k.data.data.status === 3 && k.data.data.changeStatus === 2) || k.data.data.status === 2 || k.data.data.status === 1) {
 								this.statusGO = false;
@@ -189,10 +189,20 @@ export default {
 					}
 					this.listData = res.data.data;
 					this.$api.goodsDetail(res.data.data.goodsId).then(rs => {
-						if(rs.data.data.goodsType === 3 && (res.data.data.remindId === 1 || res.data.data.remindId === 3 || res.data.data.remindId === 5 || res.data.data.remindId === 6 || res.data.data.remindId === 7 || res.data.data.remindId === 19 || res.data.data.remindId === 21 || res.data.data.remindId === 22) ){
-							this.statusGO = false
+						if (
+							rs.data.data.goodsType === 3 &&
+							(res.data.data.remindId === 1 ||
+								res.data.data.remindId === 3 ||
+								res.data.data.remindId === 5 ||
+								res.data.data.remindId === 6 ||
+								res.data.data.remindId === 7 ||
+								res.data.data.remindId === 19 ||
+								res.data.data.remindId === 21 ||
+								res.data.data.remindId === 22)
+						) {
+							this.statusGO = false;
 						}
-					})
+					});
 				}
 			});
 		},
@@ -211,7 +221,7 @@ export default {
 				case 21:
 				case 22:
 				case 23:
-				arsty = '立刻学习';
+					arsty = '立刻学习';
 					break;
 				case 2:
 				case 4:
@@ -239,7 +249,16 @@ export default {
 		}
 	},
 	onReachBottom() {},
-	computed: { ...mapGetters(['userInfo']) }
+	computed: { ...mapGetters(['userInfo']) },
+	onUnload() {
+		var pages = getCurrentPages();
+		var currPage = pages[pages.length - 1]; //当前页面
+		var prePage = pages[pages.length - 2]; //上一个页面
+		//调用上一页拉取数据的方法
+		if (prePage.route == 'pages2/msg/index') {
+			prePage.$vm.getChangeData(this.id);
+		}
+	}
 };
 </script>
 <style>

+ 38 - 11
pages2/msg/index.vue

@@ -1,10 +1,8 @@
 <template>
 	<view style="padding: 20rpx;">
-		<view v-if="!listData.length">
-			<u-empty text="消息列表为空" mode="message"></u-empty>
-		</view>
+		<view v-if="!listData.length"><u-empty text="消息列表为空" mode="message"></u-empty></view>
 		<view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;">
-			<navigator  hover-class="none" :url="`/pages2/msg/detail?id=${item.id}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
+			<navigator hover-class="none" :url="`/pages2/msg/detail?id=${item.id}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
 				<view style="display: flex;justify-content: space-between;align-items: center;height: 60rpx;">
 					<view style="color: #333333;font-size: 30rpx;font-weight: bold;display: flex;align-items: center;">
 						<image :src="item.systemStatus === 1 ? img1 : img2" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"></image>
@@ -23,6 +21,7 @@
 				</view>
 			</navigator>
 		</view>
+		<u-divider v-if="totals !== 0 && listData.length === totals" bg-color="#eaeef1">到底了</u-divider>
 	</view>
 </template>
 
@@ -47,15 +46,22 @@ export default {
 			current: 0,
 			img1: '/static/icon/msg_icon1.png',
 			img2: '/static/icon/msg_icon2.png',
-			listData: []
+			listData: [],
+			totals: 0,
+			formData: {
+				pageNum: 1,
+				pageSize: 8
+			}
 		};
 	},
 	onPullDownRefresh() {
+		this.formData.pageNum = 1
 		this.$api
-			.getappinformUserlist()
+			.getappinformUserlist(this.formData)
 			.then(res => {
 				if (res.data.code === 200) {
 					this.listData = res.data.rows;
+					this.totals = res.data.total;
 				}
 			})
 			.finally(() => {
@@ -63,10 +69,11 @@ export default {
 			});
 	},
 	onLoad(option) {
-		this.$store.getters.dictObj
+		this.$store.getters.dictObj;
+		this.getInfo();
 	},
 	onShow() {
-		this.getInfo();
+		// this.getInfo();
 	},
 	onShareAppMessage(res) {
 		var self = this;
@@ -76,15 +83,35 @@ export default {
 		};
 	},
 	methods: {
+		getChangeData(v){
+			this.listData.map(item => {
+				if(item.id === v && item.receiptStatus !== 1){
+					item.receiptStatus = 1
+				}
+			})
+		}, 
 		getInfo() {
-			this.$api.getappinformUserlist().then(res => {
+			this.$api.getappinformUserlist(this.formData).then(res => {
 				if (res.data.code === 200) {
 					this.listData = res.data.rows;
+					this.totals = res.data.total;
 				}
-			})
+			});
+		},
+		againGetApi() {
+			this.$api.getappinformUserlist(this.formData).then(res => {
+				if (res.data.code === 200) {
+					this.listData = this.listData.concat(res.data.rows);
+				}
+			});
+		}
+	},
+	onReachBottom() {
+		if (this.listData.length < this.totals) {
+			this.formData.pageNum++;
+			this.againGetApi();
 		}
 	},
-	onReachBottom() {},
 	computed: { ...mapGetters(['userInfo']) }
 };
 </script>

+ 1 - 1
pages2/register/forget.vue

@@ -168,7 +168,7 @@ export default {
 							console.log(err);
 						});
 				} else {
-					this.$refs.tel.onFieldBlur()
+					this.$refs.tel.onFieldChange()
 				}
 			}
 				

+ 1 - 1
pages2/register/register.vue

@@ -169,7 +169,7 @@ export default {
 						}
 					);	
 				} else {
-					this.$refs.tel.onFieldBlur()
+					this.$refs.tel.onFieldChange()
 				}
 			}
 

BIN
static/logo.png


BIN
static/logo2.png