zs 1 год назад
Родитель
Сommit
c91ca27fbc
43 измененных файлов с 5479 добавлено и 2030 удалено
  1. 2 6
      pages.json
  2. 77 4
      pages/home/index.vue
  3. 197 4
      pages/science/index.vue
  4. 0 0
      pagesScience/science/index.vue
  5. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  6. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.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/science/index.js.map
  9. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesScience/index/index.js.map
  10. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesScience/science/index.js.map
  11. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map
  12. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map
  13. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  14. 1 1
      unpackage/dist/dev/mp-weixin/app.json
  15. 115 0
      unpackage/dist/dev/mp-weixin/common/runtime.js
  16. 2858 1808
      unpackage/dist/dev/mp-weixin/common/vendor.js
  17. 156 3
      unpackage/dist/dev/mp-weixin/pages/home/index.js
  18. 4 1
      unpackage/dist/dev/mp-weixin/pages/home/index.json
  19. 1 1
      unpackage/dist/dev/mp-weixin/pages/home/index.wxml
  20. 9 2
      unpackage/dist/dev/mp-weixin/pages/home/index.wxss
  21. 214 3
      unpackage/dist/dev/mp-weixin/pages/science/index.js
  22. 0 1
      unpackage/dist/dev/mp-weixin/pages/science/index.json
  23. 1 1
      unpackage/dist/dev/mp-weixin/pages/science/index.wxml
  24. 51 0
      unpackage/dist/dev/mp-weixin/pages/science/index.wxss
  25. 1 190
      unpackage/dist/dev/mp-weixin/pagesScience/index/index.js
  26. 190 0
      unpackage/dist/dev/mp-weixin/pagesScience/science/index.js
  27. 4 0
      unpackage/dist/dev/mp-weixin/pagesScience/science/index.json
  28. 1 0
      unpackage/dist/dev/mp-weixin/pagesScience/science/index.wxml
  29. 7 0
      unpackage/dist/dev/mp-weixin/pagesScience/science/index.wxss
  30. BIN
      unpackage/dist/dev/mp-weixin/static/friend.png
  31. BIN
      unpackage/dist/dev/mp-weixin/static/group.png
  32. 405 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js
  33. 6 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.json
  34. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.wxml
  35. 107 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.wxss
  36. 291 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js
  37. 4 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.json
  38. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.wxml
  39. 10 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.wxss
  40. 240 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
  41. 4 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json
  42. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml
  43. 511 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss

+ 2 - 6
pages.json

@@ -24,10 +24,6 @@
 			"path": "pages/science/index",
 			"style": {
 				"navigationBarTitleText": "医疗科普",
-				"navigationStyle": "custom",
-				"app-plus": {
-					"titleNView": false //禁用原生导航栏  
-				},
 				"enablePullDownRefresh": true
 			}
 		},
@@ -58,9 +54,9 @@
 			"root": "pagesScience",
 			"pages": [ //分包
 				{
-					"path": "index/index",
+					"path": "science/index",
 					"style": {
-						"navigationBarTitleText": "test"
+						"navigationBarTitleText": "医疗科普详情"
 					}
 				}
 			]

+ 77 - 4
pages/home/index.vue

@@ -1,22 +1,95 @@
 <template>
 	<view class="main">
-		健康问答
+		<view class="one">
+			<swiper class="swiper" circular :indicator-dots="true" indicator-color="#F5F5F5"
+				indicator-active-color="#ffffff" :autoplay="false" :interval="3000" :duration="1000">
+				<swiper-item class="list" v-for="(item,index) in advertList" :key="index">
+					<image class="image" :src="item.image&&item.image.length>0?item.image[0].url:''" mode=""></image>
+				</swiper-item>
+			</swiper>
+		</view>
+		<view class="two">
+			<uni-collapse>
+				<uni-collapse-item title="群组" thumb="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png">
+					<view class="content">
+						<text class="text">群组</text>
+					</view>
+				</uni-collapse-item>
+				<uni-collapse-item title="好友" thumb="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png">
+					<view class="content">
+						<text class="text">群组</text>
+					</view>
+				</uni-collapse-item>
+			</uni-collapse>
+		</view>
 	</view>
 </template>
 
 <script>
 	export default {
 		data() {
-			return {}
+			return {
+				user: {},
+				// 广告
+				advertList: []
+			}
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.searchToken();
+			await that.searchOther();
+			await 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;
+				let res;
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// // 查询类型
+				// res = await that.$api(`/dictData`, 'GET', {
+				// 	type: 'home_tabs',
+				// 	is_use: '0',
+				// })
+				// if (res.errcode == '0') that.$set(that, `typeList`, res.data);
+			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
 	.main {
-		padding: 2vw;
+		.one {
+			padding: 0 0 2vw 0;
+
+			.swiper {
+				height: 60vw;
+
+				.list {
+					.image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+		}
 	}
 </style>

+ 197 - 4
pages/science/index.vue

@@ -1,22 +1,215 @@
 <template>
 	<view class="main">
-		医疗科普
+		<view class="one">
+			<input type="text" v-model="searchInfo.title" @input="toInput" placeholder="搜索标题">
+		</view>
+		<view class="two">
+			<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)">
+						1111
+					</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 {}
+			return {
+				config: {},
+				user: {},
+				list: [],
+				total: 0,
+				skip: 0,
+				limit: 6,
+				page: 0,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0,
+			}
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.searchToken();
+			that.searchConfig();
+		},
+		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(`/article`, 'GET', {
+					...info,
+					...that.searchInfo
+				})
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					that.$set(that, `list`, list)
+					that.$set(that, `total`, res.total)
+				} else {
+					uni.showToast({
+						title: res.errmsg,
+					});
+				}
+			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (that.searchInfo.title) that.$set(that.searchInfo, `title`, e.detail.value)
+				else that.$set(that, `searchInfo`, {})
+				that.clearPage();
+				that.search();
+			},
+			// 查看详情
+			toInfo(item) {
+				uni.navigateTo({
+					url: `/pagesScience/science/index?id=${item.id||item._id}`
+				})
+			},
+			// 分页
+			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`, 6)
+				that.$set(that, `page`, 0)
+			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
 	.main {
-		padding: 2vw;
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+	
+		.one {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			padding: 2vw;
+	
+			input {
+				width: 100%;
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+	
+		.two {
+			position: relative;
+			flex-grow: 1;
+			background-color: var(--f9Color);
+			margin: 2vw 0 0 0;
+	
+			.list {
+				display: flex;
+				background-color: var(--mainColor);
+				border: 1px solid var(--f5Color);
+				padding: 2vw;
+				margin: 2vw 2vw 0 2vw;
+				border-radius: 5px;
+			}
+		}
+	}
+	
+	.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>

pagesScience/index/index.vue → pagesScience/science/index.vue


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/science/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesScience/index/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pagesScience/science/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


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

@@ -15,7 +15,7 @@
     {
       "root": "pagesScience",
       "pages": [
-        "index/index"
+        "science/index"
       ]
     },
     {

+ 115 - 0
unpackage/dist/dev/mp-weixin/common/runtime.js

@@ -55,6 +55,11 @@
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
 /******/
+/******/ 	// object to store loaded CSS chunks
+/******/ 	var installedCssChunks = {
+/******/ 		"common/runtime": 0
+/******/ 	}
+/******/
 /******/ 	// object to store loaded and loading chunks
 /******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
 /******/ 	// Promise = chunk loading, 0 = chunk loaded
@@ -64,6 +69,11 @@
 /******/
 /******/ 	var deferredModules = [];
 /******/
+/******/ 	// script path function
+/******/ 	function jsonpScriptSrc(chunkId) {
+/******/ 		return __webpack_require__.p + "" + chunkId + ".js"
+/******/ 	}
+/******/
 /******/ 	// The require function
 /******/ 	function __webpack_require__(moduleId) {
 /******/
@@ -88,6 +98,108 @@
 /******/ 		return module.exports;
 /******/ 	}
 /******/
+/******/ 	// This file contains only the entry chunk.
+/******/ 	// The chunk loading function for additional chunks
+/******/ 	__webpack_require__.e = function requireEnsure(chunkId) {
+/******/ 		var promises = [];
+/******/
+/******/
+/******/ 		// mini-css-extract-plugin CSS loading
+/******/ 		var cssChunks = {"uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item":1,"uni_modules/uni-collapse/components/uni-collapse/uni-collapse":1,"uni_modules/uni-icons/components/uni-icons/uni-icons":1};
+/******/ 		if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
+/******/ 		else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
+/******/ 			promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
+/******/ 				var href = "" + ({"uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item":"uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item","uni_modules/uni-collapse/components/uni-collapse/uni-collapse":"uni_modules/uni-collapse/components/uni-collapse/uni-collapse","uni_modules/uni-icons/components/uni-icons/uni-icons":"uni_modules/uni-icons/components/uni-icons/uni-icons"}[chunkId]||chunkId) + ".wxss";
+/******/ 				var fullhref = __webpack_require__.p + href;
+/******/ 				var existingLinkTags = document.getElementsByTagName("link");
+/******/ 				for(var i = 0; i < existingLinkTags.length; i++) {
+/******/ 					var tag = existingLinkTags[i];
+/******/ 					var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
+/******/ 					if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
+/******/ 				}
+/******/ 				var existingStyleTags = document.getElementsByTagName("style");
+/******/ 				for(var i = 0; i < existingStyleTags.length; i++) {
+/******/ 					var tag = existingStyleTags[i];
+/******/ 					var dataHref = tag.getAttribute("data-href");
+/******/ 					if(dataHref === href || dataHref === fullhref) return resolve();
+/******/ 				}
+/******/ 				var linkTag = document.createElement("link");
+/******/ 				linkTag.rel = "stylesheet";
+/******/ 				linkTag.type = "text/css";
+/******/ 				linkTag.onload = resolve;
+/******/ 				linkTag.onerror = function(event) {
+/******/ 					var request = event && event.target && event.target.src || fullhref;
+/******/ 					var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
+/******/ 					err.code = "CSS_CHUNK_LOAD_FAILED";
+/******/ 					err.request = request;
+/******/ 					delete installedCssChunks[chunkId]
+/******/ 					linkTag.parentNode.removeChild(linkTag)
+/******/ 					reject(err);
+/******/ 				};
+/******/ 				linkTag.href = fullhref;
+/******/
+/******/ 				var head = document.getElementsByTagName("head")[0];
+/******/ 				head.appendChild(linkTag);
+/******/ 			}).then(function() {
+/******/ 				installedCssChunks[chunkId] = 0;
+/******/ 			}));
+/******/ 		}
+/******/
+/******/ 		// JSONP chunk loading for javascript
+/******/
+/******/ 		var installedChunkData = installedChunks[chunkId];
+/******/ 		if(installedChunkData !== 0) { // 0 means "already installed".
+/******/
+/******/ 			// a Promise means "currently loading".
+/******/ 			if(installedChunkData) {
+/******/ 				promises.push(installedChunkData[2]);
+/******/ 			} else {
+/******/ 				// setup Promise in chunk cache
+/******/ 				var promise = new Promise(function(resolve, reject) {
+/******/ 					installedChunkData = installedChunks[chunkId] = [resolve, reject];
+/******/ 				});
+/******/ 				promises.push(installedChunkData[2] = promise);
+/******/
+/******/ 				// start chunk loading
+/******/ 				var script = document.createElement('script');
+/******/ 				var onScriptComplete;
+/******/
+/******/ 				script.charset = 'utf-8';
+/******/ 				script.timeout = 120;
+/******/ 				if (__webpack_require__.nc) {
+/******/ 					script.setAttribute("nonce", __webpack_require__.nc);
+/******/ 				}
+/******/ 				script.src = jsonpScriptSrc(chunkId);
+/******/
+/******/ 				// create error before stack unwound to get useful stacktrace later
+/******/ 				var error = new Error();
+/******/ 				onScriptComplete = function (event) {
+/******/ 					// avoid mem leaks in IE.
+/******/ 					script.onerror = script.onload = null;
+/******/ 					clearTimeout(timeout);
+/******/ 					var chunk = installedChunks[chunkId];
+/******/ 					if(chunk !== 0) {
+/******/ 						if(chunk) {
+/******/ 							var errorType = event && (event.type === 'load' ? 'missing' : event.type);
+/******/ 							var realSrc = event && event.target && event.target.src;
+/******/ 							error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
+/******/ 							error.name = 'ChunkLoadError';
+/******/ 							error.type = errorType;
+/******/ 							error.request = realSrc;
+/******/ 							chunk[1](error);
+/******/ 						}
+/******/ 						installedChunks[chunkId] = undefined;
+/******/ 					}
+/******/ 				};
+/******/ 				var timeout = setTimeout(function(){
+/******/ 					onScriptComplete({ type: 'timeout', target: script });
+/******/ 				}, 120000);
+/******/ 				script.onerror = script.onload = onScriptComplete;
+/******/ 				document.head.appendChild(script);
+/******/ 			}
+/******/ 		}
+/******/ 		return Promise.all(promises);
+/******/ 	};
 /******/
 /******/ 	// expose the modules object (__webpack_modules__)
 /******/ 	__webpack_require__.m = modules;
@@ -141,6 +253,9 @@
 /******/ 	// __webpack_public_path__
 /******/ 	__webpack_require__.p = "/";
 /******/
+/******/ 	// on error function for async loading
+/******/ 	__webpack_require__.oe = function(err) { console.error(err); throw err; };
+/******/
 /******/ 	var jsonpArray = global["webpackJsonp"] = global["webpackJsonp"] || [];
 /******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
 /******/ 	jsonpArray.push = webpackJsonpCallback;

Разница между файлами не показана из-за своего большого размера
+ 2858 - 1808
unpackage/dist/dev/mp-weixin/common/vendor.js


+ 156 - 3
unpackage/dist/dev/mp-weixin/pages/home/index.js

@@ -98,10 +98,52 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
 var components
+try {
+  components = {
+    uniCollapse: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/uni-collapse/components/uni-collapse/uni-collapse */ "uni_modules/uni-collapse/components/uni-collapse/uni-collapse").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue */ 118))
+    },
+    uniCollapseItem: function () {
+      return __webpack_require__.e(/*! import() | uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item */ "uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue */ 125))
+    },
+  }
+} catch (e) {
+  if (
+    e.message.indexOf("Cannot find module") !== -1 &&
+    e.message.indexOf(".vue") !== -1
+  ) {
+    console.error(e.message)
+    console.error("1. 排查组件名称拼写是否正确")
+    console.error(
+      "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
+    )
+    console.error(
+      "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
+    )
+  } else {
+    throw e
+  }
+}
 var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
+  var l0 = _vm.__map(_vm.advertList, function (item, index) {
+    var $orig = _vm.__get_orig(item)
+    var g0 = item.image && item.image.length > 0
+    return {
+      $orig: $orig,
+      g0: g0,
+    }
+  })
+  _vm.$mp.data = Object.assign(
+    {},
+    {
+      $root: {
+        l0: l0,
+      },
+    }
+  )
 }
 var recyclableRender = false
 var staticRenderFns = []
@@ -135,12 +177,36 @@ __webpack_require__.r(__webpack_exports__);
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
+/* WEBPACK VAR INJECTION */(function(uni) {
 
-
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 //
 //
 //
@@ -149,11 +215,98 @@ exports.default = void 0;
 //
 var _default = {
   data: function data() {
-    return {};
+    return {
+      user: {},
+      // 广告
+      advertList: []
+    };
   },
-  methods: {}
+  onLoad: function () {
+    var _onLoad = (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;
+              that.searchToken();
+              _context.next = 4;
+              return that.searchOther();
+            case 4:
+              _context.next = 6;
+              return that.search();
+            case 6:
+            case "end":
+              return _context.stop();
+          }
+        }
+      }, _callee, this);
+    }));
+    function onLoad(_x) {
+      return _onLoad.apply(this, arguments);
+    }
+    return onLoad;
+  }(),
+  methods: {
+    // 用户信息
+    searchToken: function searchToken() {
+      var that = this;
+      try {
+        var res = uni.getStorageSync('token');
+        if (res) that.$set(that, "user", res);
+      } catch (e) {
+        uni.showToast({
+          title: err.errmsg,
+          icon: 'error',
+          duration: 2000
+        });
+      }
+    },
+    // 查询
+    search: function search() {
+      var _this = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
+        var that, res;
+        return _regenerator.default.wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                that = _this;
+              case 1:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2);
+      }))();
+    },
+    // 查询其他信息
+    searchOther: function searchOther() {
+      var _this2 = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
+        var that, res;
+        return _regenerator.default.wrap(function _callee3$(_context3) {
+          while (1) {
+            switch (_context3.prev = _context3.next) {
+              case 0:
+                that = _this2; // // 查询类型
+                // res = await that.$api(`/dictData`, 'GET', {
+                // 	type: 'home_tabs',
+                // 	is_use: '0',
+                // })
+                // if (res.errcode == '0') that.$set(that, `typeList`, res.data);
+              case 1:
+              case "end":
+                return _context3.stop();
+            }
+          }
+        }, _callee3);
+      }))();
+    }
+  }
 };
 exports.default = _default;
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
 
 /***/ }),
 

+ 4 - 1
unpackage/dist/dev/mp-weixin/pages/home/index.json

@@ -2,5 +2,8 @@
   "navigationBarTitleText": "健康问答",
   "navigationStyle": "custom",
   "enablePullDownRefresh": true,
-  "usingComponents": {}
+  "usingComponents": {
+    "uni-collapse": "/uni_modules/uni-collapse/components/uni-collapse/uni-collapse",
+    "uni-collapse-item": "/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item"
+  }
 }

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/index.wxml


+ 9 - 2
unpackage/dist/dev/mp-weixin/pages/home/index.wxss

@@ -1,7 +1,14 @@
 @charset "UTF-8";
 /* 水平间距 */
 /* 水平间距 */
-.main.data-v-71e217db {
-  padding: 2vw;
+.main .one.data-v-71e217db {
+  padding: 0 0 2vw 0;
+}
+.main .one .swiper.data-v-71e217db {
+  height: 60vw;
+}
+.main .one .swiper .list .image.data-v-71e217db {
+  width: 100%;
+  height: 100%;
 }
 

Разница между файлами не показана из-за своего большого размера
+ 214 - 3
unpackage/dist/dev/mp-weixin/pages/science/index.js


+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/science/index.json

@@ -1,6 +1,5 @@
 {
   "navigationBarTitleText": "医疗科普",
-  "navigationStyle": "custom",
   "enablePullDownRefresh": true,
   "usingComponents": {}
 }

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/science/index.wxml


+ 51 - 0
unpackage/dist/dev/mp-weixin/pages/science/index.wxss

@@ -2,6 +2,57 @@
 /* 水平间距 */
 /* 水平间距 */
 .main.data-v-357bbe3e {
+  display: flex;
+  flex-direction: column;
+  width: 100vw;
+  height: 100vh;
+}
+.main .one.data-v-357bbe3e {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 2vw;
+}
+.main .one input.data-v-357bbe3e {
+  width: 100%;
+  padding: 2vw;
+  background-color: var(--f1Color);
+  font-size: var(--font14Size);
+  border-radius: 5px;
+}
+.main .two.data-v-357bbe3e {
+  position: relative;
+  flex-grow: 1;
+  background-color: var(--f9Color);
+  margin: 2vw 0 0 0;
+}
+.main .two .list.data-v-357bbe3e {
+  display: flex;
+  background-color: var(--mainColor);
+  border: 1px solid var(--f5Color);
   padding: 2vw;
+  margin: 2vw 2vw 0 2vw;
+  border-radius: 5px;
+}
+.scroll-view.data-v-357bbe3e {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view.data-v-357bbe3e {
+  display: flex;
+  flex-direction: column;
+}
+.is_bottom.data-v-357bbe3e {
+  width: 100%;
+  text-align: center;
+}
+.is_bottom text.data-v-357bbe3e {
+  padding: 2vw 0;
+  display: inline-block;
+  color: var(--f85Color);
+  font-size: var(--font14Size);
 }
 

Разница между файлами не показана из-за своего большого размера
+ 1 - 190
unpackage/dist/dev/mp-weixin/pagesScience/index/index.js


Разница между файлами не показана из-за своего большого размера
+ 190 - 0
unpackage/dist/dev/mp-weixin/pagesScience/science/index.js


+ 4 - 0
unpackage/dist/dev/mp-weixin/pagesScience/science/index.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "医疗科普详情",
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesScience/science/index.wxml

@@ -0,0 +1 @@
+<view class="main data-v-70804fa6">首页</view>

+ 7 - 0
unpackage/dist/dev/mp-weixin/pagesScience/science/index.wxss

@@ -0,0 +1,7 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.main.data-v-70804fa6 {
+  padding: 2vw;
+}
+

BIN
unpackage/dist/dev/mp-weixin/static/friend.png


BIN
unpackage/dist/dev/mp-weixin/static/group.png


Разница между файлами не показана из-за своего большого размера
+ 405 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js


+ 6 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
+  },
+  "component": true
+}

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.wxml


+ 107 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.wxss

@@ -0,0 +1,107 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.uni-collapse-item {
+  box-sizing: border-box;
+}
+.uni-collapse-item__title {
+  display: flex;
+  width: 100%;
+  box-sizing: border-box;
+  flex-direction: row;
+  align-items: center;
+  transition: border-bottom-color .3s;
+}
+.uni-collapse-item__title-wrap {
+  width: 100%;
+  flex: 1;
+}
+.uni-collapse-item__title-box {
+  padding: 0 15px;
+  display: flex;
+  width: 100%;
+  box-sizing: border-box;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  height: 48px;
+  line-height: 48px;
+  background-color: #fff;
+  color: #303133;
+  font-size: 13px;
+  font-weight: 500;
+}
+.uni-collapse-item__title-box.is-disabled .uni-collapse-item__title-text {
+  color: #999;
+}
+.uni-collapse-item__title.uni-collapse-item-border {
+  border-bottom: 1px solid #ebeef5;
+}
+.uni-collapse-item__title.is-open {
+  border-bottom-color: transparent;
+}
+.uni-collapse-item__title-img {
+  height: 22px;
+  width: 22px;
+  margin-right: 10px;
+}
+.uni-collapse-item__title-text {
+  flex: 1;
+  font-size: 14px;
+  white-space: nowrap;
+  color: inherit;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.uni-collapse-item__title-arrow {
+  display: flex;
+  box-sizing: border-box;
+  align-items: center;
+  justify-content: center;
+  width: 20px;
+  height: 20px;
+  margin-right: 10px;
+  -webkit-transform: rotate(0deg);
+          transform: rotate(0deg);
+}
+.uni-collapse-item__title-arrow-active {
+  -webkit-transform: rotate(-180deg);
+          transform: rotate(-180deg);
+}
+.uni-collapse-item__wrap {
+  will-change: height;
+  box-sizing: border-box;
+  background-color: #fff;
+  overflow: hidden;
+  position: relative;
+  height: 0;
+}
+.uni-collapse-item__wrap.is--transition {
+  transition-property: height, border-bottom-width;
+  transition-duration: 0.3s;
+  will-change: height;
+}
+.uni-collapse-item__wrap-content {
+  position: absolute;
+  font-size: 13px;
+  color: #303133;
+  border-bottom-color: transparent;
+  border-bottom-style: solid;
+  border-bottom-width: 0;
+}
+.uni-collapse-item__wrap-content.uni-collapse-item--border {
+  border-bottom-width: 1px;
+  border-bottom-color: red;
+  border-bottom-color: #ebeef5;
+}
+.uni-collapse-item__wrap-content.open {
+  position: relative;
+}
+.uni-collapse-item--animation {
+  transition-property: -webkit-transform;
+  transition-property: transform;
+  transition-property: transform, -webkit-transform;
+  transition-duration: 0.3s;
+  transition-timing-function: ease;
+}
+

Разница между файлами не показана из-за своего большого размера
+ 291 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js


+ 4 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "component": true
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.wxml

@@ -0,0 +1 @@
+<view class="uni-collapse"><slot></slot></view>

+ 10 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.wxss

@@ -0,0 +1,10 @@
+@charset "UTF-8";
+/* 水平间距 */
+/* 水平间距 */
+.uni-collapse {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  background-color: #fff;
+}
+

Разница между файлами не показана из-за своего большого размера
+ 240 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js


+ 4 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "component": true
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml

@@ -0,0 +1 @@
+<text data-event-opts="{{[['tap',[['_onClick',['$event']]]]]}}" class="{{['uni-icons','uniui-'+type,customPrefix,customPrefix?type:'']}}" style="{{'color:'+(color)+';'+('font-size:'+(iconSize)+';')}}" bindtap="__e"></text>

Разница между файлами не показана из-за своего большого размера
+ 511 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss