zs 1 year ago
parent
commit
af1bb3633c
31 changed files with 219 additions and 118 deletions
  1. 53 24
      pagesHome/article/index.vue
  2. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  3. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/swiper/index.js.map
  4. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tabs/index.js.map
  5. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/upload/index.js.map
  6. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/customer/index.js.map
  7. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/index.js.map
  8. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  9. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/index.js.map
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/article/index.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/collect/index.js.map
  13. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/comment/index.js.map
  14. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/like/index.js.map
  15. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/login/index.js.map
  16. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/type/index.js.map
  17. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/account/index.js.map
  18. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/article/add.js.map
  19. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/article/index.js.map
  20. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/coupon/index.js.map
  21. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/opinion/index.js.map
  22. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-badge/components/uni-badge/uni-badge.js.map
  23. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.js.map
  24. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map
  25. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js.map
  26. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms/uni-forms.js.map
  27. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  28. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js.map
  29. 116 66
      unpackage/dist/dev/mp-weixin/pagesHome/article/index.js
  30. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/article/index.wxml
  31. 22 0
      unpackage/dist/dev/mp-weixin/pagesHome/article/index.wxss

+ 53 - 24
pagesHome/article/index.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="main">
 		<view class="info">
-			<scroll-view scroll-y="true" :scroll-top="scrollTop" class="scroll-view">
+			<scroll-view scroll-y="true" :scroll-top="scrollTop" class="scroll-view" @scrolltolower="toPage"
+				@scroll="toScroll">
 				<view class="list-scroll-view">
 					<view class="one">
 						<swiperImg :imgsList='info.file'></swiperImg>
@@ -16,18 +17,17 @@
 					</view>
 					<view class="thr">
 						<view class="thr_1">评论 {{total}}</view>
-						<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+						<scroll-view scroll-y="true" class="scroll">
 							<view class="list-scroll-view">
-								<view class="thr_2">
-									<view class="list" v-for="(item,index) in list" :key="index">
-										<image class="image"
-											:src="item.user_file&&item.user_file.length>0?item.user_file[0].url:'../../static/my.png'"
-											mode="aspectFill">
-										</image>
-										<view class="other">
-											<view class="name textOver">{{item.user_name||'暂无'}}</view>
-											<view class="content">{{item.content||'暂无'}}</view>
-										</view>
+								<view class="list" v-for="(item,index) in list" :key="index">
+									<image class="image"
+										:src="item.user_file&&item.user_file.length>0?item.user_file[0].url:'../../static/my.png'"
+										mode="aspectFill">
+									</image>
+									<view class="other">
+										<view class="name textOver">{{item.user_name||'暂无'}}</view>
+										<view class="content">{{item.content||'暂无'}}</view>
+										<view class="name">{{item.create_time||'暂无'}}</view>
 									</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
@@ -83,7 +83,7 @@
 				list: [],
 				total: 0,
 				skip: 0,
-				limit: 15,
+				limit: 6,
 				page: 0,
 				// 数据是否触底
 				is_bottom: false,
@@ -107,17 +107,13 @@
 			await that.search();
 		},
 		methods: {
-			searchConfig() {
+			async searchConfig() {
 				const that = this;
-				try {
-					const res = uni.getStorageSync('config');
-					if (res) that.$set(that, `config`, res);
-				} catch (e) {
-					uni.showToast({
-						title: err.errmsg,
-						icon: 'error',
-						duration: 2000
-					});
+				let res;
+				// 基本设置
+				res = await that.$api(`/config`, 'GET', {});
+				if (res.errcode == '0') {
+					that.$set(that, `config`, res.data);
 				}
 			},
 			searchToken() {
@@ -178,6 +174,13 @@
 					...info,
 				});
 				if (res.errcode == '0') {
+					for (let val of res.data) {
+						const user = await that.$api(`/user/${val.user}`, 'GET', {});
+						if (user.errcode == '0') {
+							val.user_file = user.data.logo
+							val.user_name = user.data.name || user.data.nick_name
+						}
+					}
 					let list = [...that.list, ...res.data];
 					that.$set(that, `list`, list);
 					that.$set(that, `total`, res.total)
@@ -271,7 +274,7 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 15)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			},
 			// 查询其他信息
@@ -332,6 +335,32 @@
 					font-size: var(--font15Size);
 					border-bottom: 1px solid var(--f9Color);
 				}
+
+				.list {
+					display: flex;
+					align-items: center;
+					padding: 2vw;
+
+					.image {
+						width: 10vw;
+						height: 10vw;
+						border-radius: 10vw;
+					}
+
+					.other {
+						display: flex;
+						flex-direction: column;
+						width: 80vw;
+						padding: 2vw;
+						border-bottom: 1px solid var(--f9Color);
+						font-size: var(--font12Size);
+
+						.name {
+							color: var(--f85Color);
+							padding: 2px 0;
+						}
+					}
+				}
 			}
 		}
 

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/swiper/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/tabs/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/upload/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/customer/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/article/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/collect/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/comment/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/like/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/login/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/type/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/account/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/article/add.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/article/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/coupon/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/opinion/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-badge/components/uni-badge/uni-badge.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms/uni-forms.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js.map


File diff suppressed because it is too large
+ 116 - 66
unpackage/dist/dev/mp-weixin/pagesHome/article/index.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/article/index.wxml


+ 22 - 0
unpackage/dist/dev/mp-weixin/pagesHome/article/index.wxss

@@ -36,6 +36,28 @@
   font-size: var(--font15Size);
   border-bottom: 1px solid var(--f9Color);
 }
+.main .info .thr .list.data-v-344a728f {
+  display: flex;
+  align-items: center;
+  padding: 2vw;
+}
+.main .info .thr .list .image.data-v-344a728f {
+  width: 10vw;
+  height: 10vw;
+  border-radius: 10vw;
+}
+.main .info .thr .list .other.data-v-344a728f {
+  display: flex;
+  flex-direction: column;
+  width: 80vw;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f9Color);
+  font-size: var(--font12Size);
+}
+.main .info .thr .list .other .name.data-v-344a728f {
+  color: var(--f85Color);
+  padding: 2px 0;
+}
 .main .foot.data-v-344a728f {
   padding: 2vw;
   background-color: var(--mainColor);