Browse Source

修改新闻 活动

zs 1 year ago
parent
commit
ee5b6f53ff
70 changed files with 1580 additions and 302 deletions
  1. 13 0
      pages.json
  2. 1 3
      pages/home/index.vue
  3. 146 0
      pagesHome/news/detail.vue
  4. 235 0
      pagesHome/news/index.vue
  5. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  6. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  7. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/swiper/index.js.map
  8. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tabs/index.js.map
  9. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/upload/index.js.map
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/customer/common/submit_1.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/customer/index.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/index.js.map
  13. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  14. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/index.js.map
  15. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index.js.map
  16. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/article/index.js.map
  17. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hotel/detail.js.map
  18. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hotel/index.js.map
  19. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hotel/info.js.map
  20. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/info/index.js.map
  21. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/news/detail.js.map
  22. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/news/index.js.map
  23. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/notice/detail.js.map
  24. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/notice/index.js.map
  25. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/type/index.js.map
  26. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/type/info.js.map
  27. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/weather/index.js.map
  28. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/collect/index.js.map
  29. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/comment/index.js.map
  30. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/like/index.js.map
  31. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/login/index.js.map
  32. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesIndex/order/index.js.map
  33. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/account/index.js.map
  34. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/article/add.js.map
  35. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/article/index.js.map
  36. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/coupon/index.js.map
  37. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/opinion/index.js.map
  38. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-badge/components/uni-badge/uni-badge.js.map
  39. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map
  40. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map
  41. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.js.map
  42. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map
  43. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js.map
  44. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms/uni-forms.js.map
  45. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  46. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js.map
  47. 3 1
      unpackage/dist/dev/mp-weixin/app.json
  48. 11 0
      unpackage/dist/dev/mp-weixin/common/vendor.js
  49. 14 14
      unpackage/dist/dev/mp-weixin/components/swiper/index.js
  50. 14 14
      unpackage/dist/dev/mp-weixin/components/tabs/index.js
  51. 15 15
      unpackage/dist/dev/mp-weixin/components/upload/index.js
  52. 14 14
      unpackage/dist/dev/mp-weixin/pages/customer/common/submit_1.js
  53. 50 67
      unpackage/dist/dev/mp-weixin/pages/home/index.js
  54. 328 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/detail.js
  55. 6 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/detail.json
  56. 1 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/detail.wxml
  57. 37 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/detail.wxss
  58. 451 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/index.js
  59. 5 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/index.json
  60. 1 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/index.wxml
  61. 59 0
      unpackage/dist/dev/mp-weixin/pagesHome/news/index.wxss
  62. 14 14
      unpackage/dist/dev/mp-weixin/uni_modules/uni-badge/components/uni-badge/uni-badge.js
  63. 15 15
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js
  64. 14 14
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js
  65. 16 16
      unpackage/dist/dev/mp-weixin/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.js
  66. 15 15
      unpackage/dist/dev/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js
  67. 14 14
      unpackage/dist/dev/mp-weixin/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js
  68. 16 16
      unpackage/dist/dev/mp-weixin/uni_modules/uni-forms/components/uni-forms/uni-forms.js
  69. 15 15
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
  70. 15 15
      unpackage/dist/dev/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js

+ 13 - 0
pages.json

@@ -173,6 +173,19 @@
 					"style": {
 						"navigationBarTitleText": "公告详情"
 					}
+				},
+				{
+					"path": "news/index",
+					"style": {
+						"navigationBarTitleText": "新闻",
+						"enablePullDownRefresh": true
+					}
+				},
+				{
+					"path": "news/detail",
+					"style": {
+						"navigationBarTitleText": "新闻详情"
+					}
 				}
 			]
 		}

+ 1 - 3
pages/home/index.vue

@@ -113,9 +113,6 @@
 				scrollTop: 0,
 			}
 		},
-		onLoad: async function() {
-			const that = this;
-		},
 		onShow: async function(e) {
 			const that = this;
 			that.searchToken();
@@ -125,6 +122,7 @@
 		},
 		onPullDownRefresh: async function() {
 			const that = this;
+			await that.searchOther();
 			that.clearPage();
 			await that.search();
 			uni.stopPullDownRefresh();

+ 146 - 0
pagesHome/news/detail.vue

@@ -0,0 +1,146 @@
+<template>
+	<view class="main">
+		<view class="one">
+			<view class="one_1">{{info.name||'暂无'}}</view>
+			<view class="one_2">{{info.fixed_time||'暂无'}}</view>
+		</view>
+		<view class="two">
+			<view class="two_1">类型:{{info.zhType||'暂无'}}</view>
+			<view class="two_2">来源:{{info.source||'暂无'}}</view>
+			<view class="two_3">作者:{{info.author||'暂无'}}</view>
+		</view>
+		<view class="thr" v-if="info.file.length>0">
+			<swiperImg :imgsList='info.file'></swiperImg>
+		</view>
+		<view class="four">
+			<rich-text :nodes="formatRichText(info.brief)"></rich-text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import swiperImg from '../../components/swiper/index.vue';
+	export default {
+		components: {
+			swiperImg
+		},
+		data() {
+			return {
+				id: '',
+				user: {},
+				info: {
+					file: []
+				},
+				// 字典表
+				typeList: []
+			}
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e && e.id || '');
+			that.searchToken();
+			await that.searchOther();
+			that.search();
+		},
+		methods: {
+			searchToken() {
+				const that = this;
+				try {
+					const res = uni.getStorageSync('token');
+					if (res) {
+						that.$set(that, `user`, res);
+					}
+				} catch (e) {
+					uni.showToast({
+						title: err.errmsg,
+						icon: 'error',
+						duration: 2000
+					});
+				}
+			},
+			async search() {
+				const that = this;
+				if (that.id) {
+					const res = await that.$api(`/news/${that.id}`, 'GET', {})
+					if (res.errcode == '0') {
+						const type = that.typeList.find(i => i.value == res.data.type)
+						if (type) res.data.zhType = type.label
+						that.$set(that, `info`, res.data)
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+						});
+					}
+				}
+			},
+			// 处理富文本
+			formatRichText(html) {
+				// 富文本内容格式化
+				return html && html.replace(/<img[^>]*>/gi, function(match, capture) {
+					// 查找所有的 img 元素
+					return match.replace(/style=".*"/gi, '').replace(/style='.*'/gi,
+						'')
+					// 删除找到的所有 img 元素中的 style 属性
+				}).replace(/\<img/gi, '<img style="width:100%;"') // 对 img 元素增加 style 属性,并设置宽度为 100%
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// 查询类型
+				res = await that.$api(`/dictData`, 'GET', {
+					type: 'news_type',
+					is_use: '0',
+				})
+				if (res.errcode == '0') that.$set(that, `typeList`, res.data);
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.main {
+
+		.one {
+			padding: 4vw 2vw;
+			text-align: center;
+
+			.one_1 {
+				padding: 1vw 0;
+				font-weight: bold;
+				font-size: var(--font16Size);
+			}
+
+			.one_2 {
+				color: var(--f85Color);
+				font-size: var(--font12Size);
+			}
+
+		}
+
+		.two {
+			text-align: center;
+
+			.button {
+				margin: 1vw 0 0 0;
+				background-color: var(--f3CColor);
+				color: var(--mainColor);
+				font-size: var(--font14Size);
+			}
+		}
+
+		.thr {
+			text-align: center;
+			padding: 2vw;
+
+			.image {
+				width: 50vw;
+				height: 50vw;
+			}
+		}
+
+		.four {
+			padding: 2vw;
+		}
+	}
+</style>

+ 235 - 0
pagesHome/news/index.vue

@@ -0,0 +1,235 @@
+<template>
+	<view class="main">
+		<view class="one">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
+						<view class="list_1 textOver">{{item.name||'暂无'}}</view>
+						<view class="list_2">
+							<view class="time"><text>类型:</text>{{item.zhType||'暂无'}}
+							</view>
+							<view class="time"><text>来源:</text>{{item.source||'暂无'}}
+							</view>
+							<view class="time"><text>作者:</text>{{item.author||'暂无'}}
+							</view>
+							<view class="time"><text>发布时间:</text>{{item.fixed_time||'暂无'}}
+							</view>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottom_title||'到底了!'}}</text>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				config: {},
+				user: {},
+				list: [],
+				total: 0,
+				skip: 0,
+				limit: 15,
+				page: 0,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0,
+				// 字典表
+				typeList: []
+			}
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.searchToken();
+			that.searchConfig();
+			await that.searchOther();
+		},
+		onShow: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
+		methods: {
+			searchToken() {
+				const that = this;
+				try {
+					const res = uni.getStorageSync('token');
+					if (res) that.$set(that, `user`, res);
+				} catch (e) {
+					uni.showToast({
+						title: err.errmsg,
+						icon: 'error',
+						duration: 2000
+					});
+				}
+			},
+			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
+					});
+				}
+			},
+			async search() {
+				const that = this;
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					is_use: '0'
+				}
+				const res = await that.$api(`/news`, 'GET', {
+					...info,
+					...that.searchInfo
+				})
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					for (let val of list) {
+						const type = that.typeList.find(i => i.value == val.type)
+						if (type) val.zhType = type.label
+					}
+					that.$set(that, `list`, list)
+					that.$set(that, `total`, res.total)
+				} else {
+					uni.showToast({
+						title: res.errmsg,
+					});
+				}
+			},
+			// 查看详情
+			toInfo(item) {
+				uni.navigateTo({
+					url: `/pagesHome/news/detail?id=${item.id||item._id}`
+				})
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// 查询类型
+				res = await that.$api(`/dictData`, 'GET', {
+					type: 'news_type',
+					is_use: '0',
+				})
+				if (res.errcode == '0') that.$set(that, `typeList`, res.data);
+			},
+			// 分页
+			toPage(e) {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.search();
+					uni.hideLoading();
+				} else that.$set(that, `is_bottom`, true)
+			},
+			toScroll(e) {
+				const that = this;
+				let up = that.scrollTop;
+				that.$set(that, `scrollTop`, e.detail.scrollTop);
+				let num = Math.sign(up - e.detail.scrollTop);
+				if (num == 1) that.$set(that, `is_bottom`, false);
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 15)
+				that.$set(that, `page`, 0)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			position: relative;
+			flex-grow: 1;
+			background-color: var(--f9Color);
+			padding: 2vw 0 0 0;
+
+			.list {
+				background-color: var(--mainColor);
+				border: 1px solid var(--f5Color);
+				padding: 2vw;
+				margin: 2vw 2vw 0 2vw;
+				border-radius: 5px;
+
+				.list_1 {
+					padding: 2vw;
+					font-weight: bold;
+					font-size: var(--font16Size);
+				}
+
+				.list_2 {
+					padding: 2vw;
+					font-size: var(--font12Size);
+
+					.time {
+						padding: 0 0 2px 0;
+
+						text {
+							color: var(--f85Color);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		width: 100%;
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: var(--f85Color);
+			font-size: var(--font14Size);
+		}
+	}
+</style>

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/common/vendor.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/common/submit_1.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/pagesHome/hotel/detail.js.map


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


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


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


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


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


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


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


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


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


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/weather/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/order/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-collapse/components/uni-collapse-item/uni-collapse-item.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.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


+ 3 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -39,7 +39,9 @@
         "hotel/detail",
         "weather/index",
         "notice/index",
-        "notice/detail"
+        "notice/detail",
+        "news/index",
+        "news/detail"
       ]
     }
   ],

+ 11 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -39489,6 +39489,17 @@ var _default = {
       "style": {
         "navigationBarTitleText": "公告详情"
       }
+    }, {
+      "path": "news/index",
+      "style": {
+        "navigationBarTitleText": "新闻",
+        "enablePullDownRefresh": true
+      }
+    }, {
+      "path": "news/detail",
+      "style": {
+        "navigationBarTitleText": "新闻详情"
+      }
     }]
   }],
   "globalStyle": {

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


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


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


File diff suppressed because it is too large
+ 14 - 14
unpackage/dist/dev/mp-weixin/pages/customer/common/submit_1.js


+ 50 - 67
unpackage/dist/dev/mp-weixin/pages/home/index.js

@@ -290,47 +290,27 @@ var _default = {
       scrollTop: 0
     };
   },
-  onLoad: function () {
-    var _onLoad = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
+  onShow: function () {
+    var _onShow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
       var that;
       return _regenerator.default.wrap(function _callee$(_context) {
         while (1) {
           switch (_context.prev = _context.next) {
-            case 0:
-              that = this;
-            case 1:
-            case "end":
-              return _context.stop();
-          }
-        }
-      }, _callee, this);
-    }));
-    function onLoad() {
-      return _onLoad.apply(this, arguments);
-    }
-    return onLoad;
-  }(),
-  onShow: function () {
-    var _onShow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(e) {
-      var that;
-      return _regenerator.default.wrap(function _callee2$(_context2) {
-        while (1) {
-          switch (_context2.prev = _context2.next) {
             case 0:
               that = this;
               that.searchToken();
-              _context2.next = 4;
+              _context.next = 4;
               return that.searchOther();
             case 4:
               that.clearPage();
-              _context2.next = 7;
+              _context.next = 7;
               return that.search();
             case 7:
             case "end":
-              return _context2.stop();
+              return _context.stop();
           }
         }
-      }, _callee2, this);
+      }, _callee, this);
     }));
     function onShow(_x) {
       return _onShow.apply(this, arguments);
@@ -338,24 +318,27 @@ var _default = {
     return onShow;
   }(),
   onPullDownRefresh: function () {
-    var _onPullDownRefresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
+    var _onPullDownRefresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
       var that;
-      return _regenerator.default.wrap(function _callee3$(_context3) {
+      return _regenerator.default.wrap(function _callee2$(_context2) {
         while (1) {
-          switch (_context3.prev = _context3.next) {
+          switch (_context2.prev = _context2.next) {
             case 0:
               that = this;
+              _context2.next = 3;
+              return that.searchOther();
+            case 3:
               that.clearPage();
-              _context3.next = 4;
+              _context2.next = 6;
               return that.search();
-            case 4:
+            case 6:
               uni.stopPullDownRefresh();
-            case 5:
+            case 7:
             case "end":
-              return _context3.stop();
+              return _context2.stop();
           }
         }
-      }, _callee3, this);
+      }, _callee2, this);
     }));
     function onPullDownRefresh() {
       return _onPullDownRefresh.apply(this, arguments);
@@ -379,11 +362,11 @@ var _default = {
     // 查询
     search: function search() {
       var _this = this;
-      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
         var that, info, res, list;
-        return _regenerator.default.wrap(function _callee4$(_context4) {
+        return _regenerator.default.wrap(function _callee3$(_context3) {
           while (1) {
-            switch (_context4.prev = _context4.next) {
+            switch (_context3.prev = _context3.next) {
               case 0:
                 that = _this;
                 info = {
@@ -394,10 +377,10 @@ var _default = {
                   type: that.tabs.active
                 };
                 if (that.user._id) info.user = that.user._id;
-                _context4.next = 5;
+                _context3.next = 5;
                 return that.$api("/article/article", 'GET', _objectSpread({}, info));
               case 5:
-                res = _context4.sent;
+                res = _context3.sent;
                 if (res.errcode == '0') {
                   list = [].concat((0, _toConsumableArray2.default)(that.list), (0, _toConsumableArray2.default)(res.data));
                   that.$set(that, "list", list);
@@ -410,10 +393,10 @@ var _default = {
                 }
               case 7:
               case "end":
-                return _context4.stop();
+                return _context3.stop();
             }
           }
-        }, _callee4);
+        }, _callee3);
       }))();
     },
     // 点击模块
@@ -437,15 +420,15 @@ var _default = {
     // 点赞/取消点赞
     toLike: function toLike(item) {
       var _this2 = this;
-      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
         var that, res, form;
-        return _regenerator.default.wrap(function _callee5$(_context5) {
+        return _regenerator.default.wrap(function _callee4$(_context4) {
           while (1) {
-            switch (_context5.prev = _context5.next) {
+            switch (_context4.prev = _context4.next) {
               case 0:
                 that = _this2;
                 if (!(item.is_like == false)) {
-                  _context5.next = 8;
+                  _context4.next = 8;
                   break;
                 }
                 form = {
@@ -454,17 +437,17 @@ var _default = {
                   type: '0',
                   create_time: (0, _moment.default)().format('YYYY-MM-DD HH:mm:ss')
                 };
-                _context5.next = 5;
+                _context4.next = 5;
                 return that.$api("/like", 'POST', form);
               case 5:
-                res = _context5.sent;
-                _context5.next = 11;
+                res = _context4.sent;
+                _context4.next = 11;
                 break;
               case 8:
-                _context5.next = 10;
+                _context4.next = 10;
                 return that.$api("/like/".concat(item.like), 'DELETE', {});
               case 10:
-                res = _context5.sent;
+                res = _context4.sent;
               case 11:
                 if (res.errcode == '0') {
                   that.clearPage();
@@ -472,37 +455,37 @@ var _default = {
                 }
               case 12:
               case "end":
-                return _context5.stop();
+                return _context4.stop();
             }
           }
-        }, _callee5);
+        }, _callee4);
       }))();
     },
     // 查询其他信息
     searchOther: function searchOther() {
       var _this3 = this;
-      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
         var that, res, data, menu;
-        return _regenerator.default.wrap(function _callee6$(_context6) {
+        return _regenerator.default.wrap(function _callee5$(_context5) {
           while (1) {
-            switch (_context6.prev = _context6.next) {
+            switch (_context5.prev = _context5.next) {
               case 0:
                 that = _this3;
-                _context6.next = 3;
+                _context5.next = 3;
                 return that.$api("/config", 'GET', {});
               case 3:
-                res = _context6.sent;
+                res = _context5.sent;
                 if (res.errcode == '0') {
                   that.$set(that, "imgList", res.data.file);
                   that.$set(that, "config", res.data);
                 }
                 //模块
-                _context6.next = 7;
+                _context5.next = 7;
                 return that.$api("/module", 'GET', {
                   is_use: '0'
                 });
               case 7:
-                res = _context6.sent;
+                res = _context5.sent;
                 if (res.errcode == '0') {
                   data = res.data.reduce(function (acc, cur, i) {
                     if (i % 10 === 0) acc.push([cur]); // 新增一个小数组
@@ -512,22 +495,22 @@ var _default = {
                   that.$set(that, "moduleList", data);
                 }
                 // 公告
-                _context6.next = 11;
+                _context5.next = 11;
                 return that.$api("/notice", 'GET', {
                   is_use: '0',
                   limit: 1
                 });
               case 11:
-                res = _context6.sent;
+                res = _context5.sent;
                 if (res.errcode == '0') that.$set(that, "content", res.data[0].name);
                 // 查询状态
-                _context6.next = 15;
+                _context5.next = 15;
                 return that.$api("/dictData", 'GET', {
                   type: 'home_tabs',
                   is_use: '0'
                 });
               case 15:
-                res = _context6.sent;
+                res = _context5.sent;
                 if (res.errcode == '0') {
                   menu = res.data.map(function (item) {
                     return {
@@ -538,19 +521,19 @@ var _default = {
                   that.$set(that.tabs, "menu", menu);
                 }
                 // 广告
-                _context6.next = 19;
+                _context5.next = 19;
                 return that.$api("/advert", 'GET', {
                   is_use: '0'
                 });
               case 19:
-                res = _context6.sent;
+                res = _context5.sent;
                 if (res.errcode == '0') that.$set(that, "advertList", res.data);
               case 21:
               case "end":
-                return _context6.stop();
+                return _context5.stop();
             }
           }
-        }, _callee6);
+        }, _callee5);
       }))();
     },
     // 选择选项卡

File diff suppressed because it is too large
+ 328 - 0
unpackage/dist/dev/mp-weixin/pagesHome/news/detail.js


+ 6 - 0
unpackage/dist/dev/mp-weixin/pagesHome/news/detail.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "新闻详情",
+  "usingComponents": {
+    "swiper-img": "/components/swiper/index"
+  }
+}

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


+ 37 - 0
unpackage/dist/dev/mp-weixin/pagesHome/news/detail.wxss

@@ -0,0 +1,37 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.main .one.data-v-c1aa1eba {
+  padding: 4vw 2vw;
+  text-align: center;
+}
+.main .one .one_1.data-v-c1aa1eba {
+  padding: 1vw 0;
+  font-weight: bold;
+  font-size: var(--font16Size);
+}
+.main .one .one_2.data-v-c1aa1eba {
+  color: var(--f85Color);
+  font-size: var(--font12Size);
+}
+.main .two.data-v-c1aa1eba {
+  text-align: center;
+}
+.main .two .button.data-v-c1aa1eba {
+  margin: 1vw 0 0 0;
+  background-color: var(--f3CColor);
+  color: var(--mainColor);
+  font-size: var(--font14Size);
+}
+.main .thr.data-v-c1aa1eba {
+  text-align: center;
+  padding: 2vw;
+}
+.main .thr .image.data-v-c1aa1eba {
+  width: 50vw;
+  height: 50vw;
+}
+.main .four.data-v-c1aa1eba {
+  padding: 2vw;
+}
+

File diff suppressed because it is too large
+ 451 - 0
unpackage/dist/dev/mp-weixin/pagesHome/news/index.js


+ 5 - 0
unpackage/dist/dev/mp-weixin/pagesHome/news/index.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "新闻",
+  "enablePullDownRefresh": true,
+  "usingComponents": {}
+}

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


+ 59 - 0
unpackage/dist/dev/mp-weixin/pagesHome/news/index.wxss

@@ -0,0 +1,59 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.main.data-v-c5c08620 {
+  display: flex;
+  flex-direction: column;
+  width: 100vw;
+  height: 100vh;
+}
+.main .one.data-v-c5c08620 {
+  position: relative;
+  flex-grow: 1;
+  background-color: var(--f9Color);
+  padding: 2vw 0 0 0;
+}
+.main .one .list.data-v-c5c08620 {
+  background-color: var(--mainColor);
+  border: 1px solid var(--f5Color);
+  padding: 2vw;
+  margin: 2vw 2vw 0 2vw;
+  border-radius: 5px;
+}
+.main .one .list .list_1.data-v-c5c08620 {
+  padding: 2vw;
+  font-weight: bold;
+  font-size: var(--font16Size);
+}
+.main .one .list .list_2.data-v-c5c08620 {
+  padding: 2vw;
+  font-size: var(--font12Size);
+}
+.main .one .list .list_2 .time.data-v-c5c08620 {
+  padding: 0 0 2px 0;
+}
+.main .one .list .list_2 .time text.data-v-c5c08620 {
+  color: var(--f85Color);
+}
+.scroll-view.data-v-c5c08620 {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view.data-v-c5c08620 {
+  display: flex;
+  flex-direction: column;
+}
+.is_bottom.data-v-c5c08620 {
+  width: 100%;
+  text-align: center;
+}
+.is_bottom text.data-v-c5c08620 {
+  padding: 2vw 0;
+  display: inline-block;
+  color: var(--f85Color);
+  font-size: var(--font14Size);
+}
+

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


File diff suppressed because it is too large
+ 15 - 15
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js


File diff suppressed because it is too large
+ 14 - 14
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js


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


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


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


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


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


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