guhongwei před 2 roky
rodič
revize
169fe9cab2
40 změnil soubory, kde provedl 748 přidání a 435 odebrání
  1. 1 1
      pages/index/index.vue
  2. 13 2
      pagesHome/app/index.vue
  3. 164 127
      pagesHome/find/index.vue
  4. 16 2
      pagesHome/home/index.vue
  5. 14 2
      pagesHome/hot/index.vue
  6. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  7. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/upload/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/pagesAccount/basic/index.js.map
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/collect/index.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/like/index.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/login/index.js.map
  13. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/other/agree.js.map
  14. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/register/index.js.map
  15. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/account/index.js.map
  16. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/app/index.js.map
  17. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/components/home-frame.js.map
  18. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/find/index.js.map
  19. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/home/index.js.map
  20. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hot/index.js.map
  21. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js.map
  22. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map
  23. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js.map
  24. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms/uni-forms.js.map
  25. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  26. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js.map
  27. 1 1
      unpackage/dist/dev/app-plus/app-service.js
  28. 131 75
      unpackage/dist/dev/app-plus/app-view.js
  29. 156 93
      unpackage/dist/dev/app-plus/pagesHome/app-sub-service.js
  30. 5 5
      unpackage/dist/dev/mp-weixin/common/vendor.js
  31. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  32. 12 0
      unpackage/dist/dev/mp-weixin/pagesHome/app/index.js
  33. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/app/index.wxml
  34. 153 98
      unpackage/dist/dev/mp-weixin/pagesHome/find/index.js
  35. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/find/index.wxml
  36. 32 3
      unpackage/dist/dev/mp-weixin/pagesHome/find/index.wxss
  37. 12 0
      unpackage/dist/dev/mp-weixin/pagesHome/home/index.js
  38. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/home/index.wxml
  39. 12 0
      unpackage/dist/dev/mp-weixin/pagesHome/hot/index.js
  40. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/hot/index.wxml

+ 1 - 1
pages/index/index.vue

@@ -37,7 +37,7 @@
 		methods: {
 			async search() {
 				const that = this;
-				let url = '/pagesHome/home/index';
+				let url = '/pagesHome/find/index';
 				// 可返回
 				// uni.navigateTo({
 				// 	url

+ 13 - 2
pagesHome/app/index.vue

@@ -2,7 +2,7 @@
 	<home-frame @toPath="toPath">
 		<view class="main">
 			<view class="one">
-				<view class="list" v-for="(item,index) in list" :key="index">
+				<view class="list" v-for="(item,index) in list" :key="index" @tap="toWeb(item)">
 					<image class="image" :src="item.img_url&&item.img_url.length>0?item.img_url[0].url:''" mode="">
 					</image>
 					<view class="name textOver">
@@ -44,7 +44,18 @@
 				if (res.errcode == '0') {
 					that.$set(that, `list`, res.data)
 				}
-
+			},
+			toWeb(e) {
+				const that = this;
+				let system = that.$config.system
+				if (system.uniPlatform == 'app') {
+					plus.runtime.openURL(e.web_url)
+				} else if (system.uniPlatform == 'mp-weixin') {
+					uni.showToast({
+						title: '小程序无法打开链接,请打开app进行跳转',
+						icon: "none"
+					})
+				}
 			},
 			// 跳转页面
 			toPath(e) {

+ 164 - 127
pagesHome/find/index.vue

@@ -3,34 +3,38 @@
 		<view class="main">
 			<view class="one">
 				<view class="list" v-for="(item,index) in typeList" :key="index" @tap="typeChange(item,index)">
-					<span :style="{background:tActive==index?'var(--rgbfa4)':''}" class="textOver">{{item.name}}</span>
+					<span :style="{background:tActive==index?'var(--rgbfa4)':''}" class="textOver">{{item.title}}</span>
 				</view>
 			</view>
 			<view class="two">
-				<view class="two_1">
-					推荐
-				</view>
-				<view class="two_2">
-					<view class="list" v-for="(item,index) in recomList" :key="index">
-						<image class="image"
-							:src="item.img_url&&item.img_url.length>0?item.img_url[0].url:'../../static/error.jpg'"
-							mode="">
-						</image>
-						<span class="name" v-if="item.name">{{item.name}}</span>
-					</view>
-				</view>
-				<view class="two_1">
-					全部
-				</view>
-				<view class="two_2">
-					<view class="list" v-for="(item,index) in list" :key="index">
-						<image class="image"
-							:src="item.img_url&&item.img_url.length>0?item.img_url[0].url:'../../static/error.jpg'"
-							mode="">
-						</image>
-						<span class="name" v-if="item.name">{{item.name}}</span>
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+					<view class="list-scroll-view">
+						<view class="two_1">
+							推荐
+						</view>
+						<view class="two_2">
+							<view class="list" v-for="(item,index) in recomList" :key="index">
+								<image class="image"
+									:src="item.img_url&&item.img_url.length>0?item.img_url[0].url:'../../static/error.jpg'"
+									mode="">
+								</image>
+								<span class="name" v-if="item.title">{{item.title}}</span>
+							</view>
+						</view>
+						<view class="two_1">
+							全部
+						</view>
+						<view class="two_2">
+							<view class="list" v-for="(item,index) in list" :key="index">
+								<image class="image"
+									:src="item.img_url&&item.img_url.length>0?item.img_url[0].url:'../../static/error.jpg'"
+									mode="">
+								</image>
+								<span class="name" v-if="item.title">{{item.title}}</span>
+							</view>
+						</view>
 					</view>
-				</view>
+				</scroll-view>
 			</view>
 		</view>
 	</home-frame>
@@ -44,118 +48,116 @@
 		},
 		data() {
 			return {
-				typeList: [ // 类型信息
-					{
-						name: '平台'
-					},
-					{
-						name: '演员'
-					}
-				],
+				typeList: [],
 				tActive: 0,
-				recomList: [ //
-					{
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					}, {
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					}, {
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					}, {
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					}, {
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					}, {
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					}
-				],
-				list: [ //
-					{
-						name: '推荐信息',
-						img_url: [ //
-							{
-								id: "20230216100918",
-								name: "头像.jpg",
-								status: "success",
-								uid: 1676513358695,
-								uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-								url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-							}
-						]
-					},
-				],
+				type_id: '',
+				recomList: [],
+				list: [],
+				total: 0,
+				page: 0,
+				skip: 0,
+				limit: 20,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0
 			};
 		},
 		onLoad() {
 
 		},
 		onShow() {
-
+			const that = this;
+			that.search()
+		},
+		onHide() {
+			const that = this;
+			that.clearPage()
 		},
 		methods: {
+			async search() {
+				const that = this;
+				let res = await that.$api('scenetype', 'GET', {
+					is_use: '0'
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `typeList`, res.data);
+					if (res.total > 0) {
+						that.$set(that, `type_id`, res.data[0]._id);
+						that.searchScene()
+						that.searchData()
+					}
+				}
+			},
 			// 类型选择
 			typeChange(e, index) {
 				const that = this;
-				that.$set(that, `tActive`, index)
+				that.$set(that, `tActive`, index);
+				that.$set(that, `type_id`, e._id);
+				that.clearPage();
+				that.searchScene();
+				that.searchData();
+			},
+			// 查询推荐
+			async searchScene() {
+				const that = this;
+				let res = await that.$api('scenedata', 'GET', {
+					skip: 0,
+					limit: 6,
+					type_id: that.type_id,
+					is_scene: '1',
+					is_use: '0',
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `recomList`, res.data);
+				}
+			},
+			// 查询数据
+			async searchData() {
+				const that = this;
+				let res = await that.$api('scenedata', 'GET', {
+					skip: that.skip,
+					limit: that.limit,
+					type_id: that.type_id,
+					is_use: '0',
+				})
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data]
+					that.$set(that, `list`, list);
+					that.$set(that, `total`, res.total);
+				}
+			},
+			toPage() {
+				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.searchData();
+					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`, 20)
+				that.$set(that, `page`, 0)
 			},
 			// 跳转页面
 			toPath(e) {
@@ -212,6 +214,7 @@
 			background-color: var(--rgb000);
 			padding: 0 2vw;
 			overflow-y: auto;
+			position: relative;
 
 			.two_1 {
 				padding: 1vw 0;
@@ -219,18 +222,22 @@
 
 			.two_2 {
 				display: flex;
-				justify-content: space-between;
+				// justify-content: space-around;
 				flex-wrap: wrap;
 				position: relative;
 
 				.list {
 					width: 30%;
+					height: 70px;
+					overflow: hidden;
 					position: relative;
-					margin: 0 0 10px 0;
+					margin: 0 10px 10px 0;
+					box-shadow: 0 0 5px var(--rgbf1f);
+					border-radius: 5px;
 
 					.image {
 						width: 100%;
-						height: 70px;
+						height: 100%;
 						border-radius: 5px;
 					}
 
@@ -242,9 +249,39 @@
 						left: 0;
 						color: var(--rgb000);
 						font-size: 12px;
+						font-family: monospace;
 					}
 				}
+
+				.list:nth-child(3n) {
+					margin: 0 0 10px 0;
+				}
 			}
 		}
 	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+			padding: 0 2vw;
+		}
+	}
+
+	.is_bottom {
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
+		}
+	}
 </style>

+ 16 - 2
pagesHome/home/index.vue

@@ -14,7 +14,8 @@
 					<view class="list-scroll-view">
 						<view class="two_0 two_1">
 							<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000">
-								<swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
+								<swiper-item class="list" v-for="(item,index) in bannerList" :key="index"
+									@tap="toWeb(item)">
 									<image class="image"
 										:src="item.img_url&&item.img_url.length>0?item.img_url[0].url:''" mode="">
 									</image>
@@ -22,7 +23,8 @@
 							</swiper>
 						</view>
 						<view class="two_0 two_2">
-							<view class="list textOver" v-for="(item,index) in linkList" :key="index">
+							<view class="list textOver" v-for="(item,index) in linkList" :key="index"
+								@tap="toWeb(item)">
 								<image class="image" :src="item.img_url&&item.img_url.length>0?item.img_url[0].url:''"
 									mode="">
 								</image>
@@ -258,6 +260,18 @@
 					that.$set(that, `linkList`, res.data)
 				}
 			},
+			toWeb(e) {
+				const that = this;
+				let system = that.$config.system
+				if (system.uniPlatform == 'app') {
+					plus.runtime.openURL(e.web_url)
+				} else if (system.uniPlatform == 'mp-weixin') {
+					uni.showToast({
+						title: '小程序无法打开链接,请打开app进行跳转',
+						icon: "none"
+					})
+				}
+			},
 			// 跳转页面
 			toPath(e) {
 				let url = `/${e.route}`;

+ 14 - 2
pagesHome/hot/index.vue

@@ -14,7 +14,7 @@
 					<view class="list-scroll-view">
 						<view class="two_0 two_1">
 							<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000">
-								<swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
+								<swiper-item class="list" v-for="(item,index) in bannerList" :key="index" @tap="toWeb(item)">
 									<image class="image"
 										:src="item.img_url&&item.img_url.length>0?item.img_url[0].url:''" mode="">
 									</image>
@@ -22,7 +22,7 @@
 							</swiper>
 						</view>
 						<view class="two_0 two_2">
-							<view class="list textOver" v-for="(item,index) in linkList" :key="index">
+							<view class="list textOver" v-for="(item,index) in linkList" :key="index" @tap="toWeb(item)">
 								<image class="image" :src="item.img_url&&item.img_url.length>0?item.img_url[0].url:''"
 									mode="">
 								</image>
@@ -258,6 +258,18 @@
 					that.$set(that, `linkList`, res.data)
 				}
 			},
+			toWeb(e) {
+				const that = this;
+				let system = that.$config.system
+				if (system.uniPlatform == 'app') {
+					plus.runtime.openURL(e.web_url)
+				} else if (system.uniPlatform == 'mp-weixin') {
+					uni.showToast({
+						title: '小程序无法打开链接,请打开app进行跳转',
+						icon: "none"
+					})
+				}
+			},
 			// 跳转页面
 			toPath(e) {
 				let url = `/${e.route}`;

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/upload/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/basic/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/collect/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/like/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/login/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/other/agree.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesAccount/register/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/account/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/app/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/components/home-frame.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/find/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/home/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesHome/hot/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-forms/components/uni-forms/uni-forms.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/app-plus/app-service.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 131 - 75
unpackage/dist/dev/app-plus/app-view.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 156 - 93
unpackage/dist/dev/app-plus/pagesHome/app-sub-service.js


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

@@ -10957,7 +10957,7 @@ function initData(vueOptions, context) {
     try {
       data = data.call(context); // 支持 Vue.prototype 上挂的数据
     } catch (e) {
-      if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
+      if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
         console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
       }
     }
@@ -18037,7 +18037,7 @@ function type(obj) {
 
 function flushCallbacks$1(vm) {
     if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
-        if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
+        if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
             var mpInstance = vm.$scope;
             console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
                 ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@@ -18058,14 +18058,14 @@ function nextTick$1(vm, cb) {
     //1.nextTick 之前 已 setData 且 setData 还未回调完成
     //2.nextTick 之前存在 render watcher
     if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
-        if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
+        if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
             var mpInstance = vm.$scope;
             console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
                 ']:nextVueTick');
         }
         return nextTick(cb, vm)
     }else{
-        if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
+        if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
             var mpInstance$1 = vm.$scope;
             console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
                 ']:nextMPTick');
@@ -18161,7 +18161,7 @@ var patch = function(oldVnode, vnode) {
     });
     var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
     if (Object.keys(diffData).length) {
-      if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
+      if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"益智游戏","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
         console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
           ']差量更新',
           JSON.stringify(diffData));

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -198,7 +198,7 @@ var _default = {
             switch (_context.prev = _context.next) {
               case 0:
                 that = _this;
-                url = '/pagesHome/home/index'; // 可返回
+                url = '/pagesHome/find/index'; // 可返回
                 // uni.navigateTo({
                 // 	url
                 // })

+ 12 - 0
unpackage/dist/dev/mp-weixin/pagesHome/app/index.js

@@ -207,6 +207,18 @@ var _default = {
         }, _callee);
       }))();
     },
+    toWeb: function toWeb(e) {
+      var that = this;
+      var system = that.$config.system;
+      if (system.uniPlatform == 'app') {
+        plus.runtime.openURL(e.web_url);
+      } else if (system.uniPlatform == 'mp-weixin') {
+        uni.showToast({
+          title: '小程序无法打开链接,请打开app进行跳转',
+          icon: "none"
+        });
+      }
+    },
     // 跳转页面
     toPath: function toPath(e) {
       var url = "/".concat(e.route);

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/app/index.wxml


+ 153 - 98
unpackage/dist/dev/mp-weixin/pagesHome/find/index.js

@@ -162,10 +162,14 @@ __webpack_require__.r(__webpack_exports__);
 "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 */ 35));
+var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 37));
 var homeFrame = function homeFrame() {
   __webpack_require__.e(/*! require.ensure | pagesHome/components/home-frame */ "pagesHome/components/home-frame").then((function () {
     return resolve(__webpack_require__(/*! ../components/home-frame.vue */ 156));
@@ -177,113 +181,164 @@ var _default = {
   },
   data: function data() {
     return {
-      typeList: [
-      // 类型信息
-      {
-        name: '平台'
-      }, {
-        name: '演员'
-      }],
+      typeList: [],
       tActive: 0,
-      recomList: [
-      //
-      {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }, {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }, {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }, {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }, {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }, {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }],
-      list: [
-      //
-      {
-        name: '推荐信息',
-        img_url: [
-        //
-        {
-          id: "20230216100918",
-          name: "头像.jpg",
-          status: "success",
-          uid: 1676513358695,
-          uri: "/files/projectadmin/imgurl/20230216100918.jpg",
-          url: "http://47.93.34.200/files/projectadmin/imgurl/20230216100918.jpg"
-        }]
-      }]
+      type_id: '',
+      recomList: [],
+      list: [],
+      total: 0,
+      page: 0,
+      skip: 0,
+      limit: 20,
+      // 数据是否触底
+      is_bottom: false,
+      scrollTop: 0
     };
   },
   onLoad: function onLoad() {},
-  onShow: function onShow() {},
+  onShow: function onShow() {
+    var that = this;
+    that.search();
+  },
+  onHide: function onHide() {
+    var that = this;
+    that.clearPage();
+  },
   methods: {
+    search: function search() {
+      var _this = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
+        var that, res;
+        return _regenerator.default.wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                that = _this;
+                _context.next = 3;
+                return that.$api('scenetype', 'GET', {
+                  is_use: '0'
+                });
+              case 3:
+                res = _context.sent;
+                if (res.errcode == '0') {
+                  that.$set(that, "typeList", res.data);
+                  if (res.total > 0) {
+                    that.$set(that, "type_id", res.data[0]._id);
+                    that.searchScene();
+                    that.searchData();
+                  }
+                }
+              case 5:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee);
+      }))();
+    },
     // 类型选择
     typeChange: function typeChange(e, index) {
       var that = this;
       that.$set(that, "tActive", index);
+      that.$set(that, "type_id", e._id);
+      that.clearPage();
+      that.searchScene();
+      that.searchData();
+    },
+    // 查询推荐
+    searchScene: function searchScene() {
+      var _this2 = 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 = _this2;
+                _context2.next = 3;
+                return that.$api('scenedata', 'GET', {
+                  skip: 0,
+                  limit: 6,
+                  type_id: that.type_id,
+                  is_scene: '1',
+                  is_use: '0'
+                });
+              case 3:
+                res = _context2.sent;
+                if (res.errcode == '0') {
+                  that.$set(that, "recomList", res.data);
+                }
+              case 5:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2);
+      }))();
+    },
+    // 查询数据
+    searchData: function searchData() {
+      var _this3 = this;
+      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
+        var that, res, list;
+        return _regenerator.default.wrap(function _callee3$(_context3) {
+          while (1) {
+            switch (_context3.prev = _context3.next) {
+              case 0:
+                that = _this3;
+                _context3.next = 3;
+                return that.$api('scenedata', 'GET', {
+                  skip: that.skip,
+                  limit: that.limit,
+                  type_id: that.type_id,
+                  is_use: '0'
+                });
+              case 3:
+                res = _context3.sent;
+                if (res.errcode == '0') {
+                  list = [].concat((0, _toConsumableArray2.default)(that.list), (0, _toConsumableArray2.default)(res.data));
+                  that.$set(that, "list", list);
+                  that.$set(that, "total", res.total);
+                }
+              case 5:
+              case "end":
+                return _context3.stop();
+            }
+          }
+        }, _callee3);
+      }))();
+    },
+    toPage: function toPage() {
+      var that = this;
+      var list = that.list;
+      var limit = that.limit;
+      if (that.total > list.length) {
+        uni.showLoading({
+          title: '加载中',
+          mask: true
+        });
+        var page = that.page + 1;
+        that.$set(that, "page", page);
+        var skip = page * limit;
+        that.$set(that, "skip", skip);
+        that.searchData();
+        uni.hideLoading();
+      } else that.$set(that, "is_bottom", true);
+    },
+    toScroll: function toScroll(e) {
+      var that = this;
+      var up = that.scrollTop;
+      that.$set(that, "scrollTop", e.detail.scrollTop);
+      var num = Math.sign(up - e.detail.scrollTop);
+      if (num == 1) that.$set(that, "is_bottom", false);
+    },
+    // 清空列表
+    clearPage: function clearPage() {
+      var that = this;
+      that.$set(that, "list", []);
+      that.$set(that, "skip", 0);
+      that.$set(that, "limit", 20);
+      that.$set(that, "page", 0);
     },
     // 跳转页面
     toPath: function toPath(e) {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/find/index.wxml


+ 32 - 3
unpackage/dist/dev/mp-weixin/pagesHome/find/index.wxss

@@ -34,24 +34,28 @@
   background-color: var(--rgb000);
   padding: 0 2vw;
   overflow-y: auto;
+  position: relative;
 }
 .main .two .two_1 {
   padding: 1vw 0;
 }
 .main .two .two_2 {
   display: flex;
-  justify-content: space-between;
   flex-wrap: wrap;
   position: relative;
 }
 .main .two .two_2 .list {
   width: 30%;
+  height: 70px;
+  overflow: hidden;
   position: relative;
-  margin: 0 0 10px 0;
+  margin: 0 10px 10px 0;
+  box-shadow: 0 0 5px var(--rgbf1f);
+  border-radius: 5px;
 }
 .main .two .two_2 .list .image {
   width: 100%;
-  height: 70px;
+  height: 100%;
   border-radius: 5px;
 }
 .main .two .two_2 .list .name {
@@ -62,5 +66,30 @@
   left: 0;
   color: var(--rgb000);
   font-size: 12px;
+  font-family: monospace;
+}
+.main .two .two_2 .list:nth-child(3n) {
+  margin: 0 0 10px 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+  padding: 0 2vw;
+}
+.is_bottom {
+  text-align: center;
+}
+.is_bottom text {
+  padding: 2vw 0;
+  display: inline-block;
+  color: #858585;
+  font-size: 14px;
 }
 

+ 12 - 0
unpackage/dist/dev/mp-weixin/pagesHome/home/index.js

@@ -313,6 +313,18 @@ var _default = {
         }, _callee);
       }))();
     },
+    toWeb: function toWeb(e) {
+      var that = this;
+      var system = that.$config.system;
+      if (system.uniPlatform == 'app') {
+        plus.runtime.openURL(e.web_url);
+      } else if (system.uniPlatform == 'mp-weixin') {
+        uni.showToast({
+          title: '小程序无法打开链接,请打开app进行跳转',
+          icon: "none"
+        });
+      }
+    },
     // 跳转页面
     toPath: function toPath(e) {
       var url = "/".concat(e.route);

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/home/index.wxml


+ 12 - 0
unpackage/dist/dev/mp-weixin/pagesHome/hot/index.js

@@ -313,6 +313,18 @@ var _default = {
         }, _callee);
       }))();
     },
+    toWeb: function toWeb(e) {
+      var that = this;
+      var system = that.$config.system;
+      if (system.uniPlatform == 'app') {
+        plus.runtime.openURL(e.web_url);
+      } else if (system.uniPlatform == 'mp-weixin') {
+        uni.showToast({
+          title: '小程序无法打开链接,请打开app进行跳转',
+          icon: "none"
+        });
+      }
+    },
     // 跳转页面
     toPath: function toPath(e) {
       var url = "/".concat(e.route);

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/hot/index.wxml