Browse Source

Signed-off-by: liuboyan <632697560@qq.com>
初次跑通流程

liuboyan 4 năm trước cách đây
mục cha
commit
7a1da0064a

+ 7 - 2
App.vue

@@ -1,6 +1,5 @@
 <script>
-	export default {
-	};
+	export default {};
 </script>
 
 <style lang="scss">
@@ -19,6 +18,7 @@
 		width: 100%;
 		height: 100%;
 	}
+
 	/* #endif */
 	::-webkit-scrollbar {
 		display: none;
@@ -27,4 +27,9 @@
 		-webkit-appearance: none;
 		background: transparent;
 	}
+
+	u-divider {
+		padding-bottom: 10px;
+		display: flex;
+	}
 </style>

+ 6 - 0
config/api.js

@@ -11,6 +11,12 @@ module.exports = {
 	getCensusChart: API_BASE + '/v2/sale/home/getCustomerCreateStatisticsList',
 	//  获取附近场馆列表
 	getNearVenueList: API_BASE + '/v2/sale/home/getVenueNearList',
+	//  获取所有场馆列表
+	getAllVenueList: API_BASE + '/v2/sale/home/getVenueNearMoreList',
+	//  获取场馆详情
+	getVenueDetail: API_BASE + '/v2/home/getVenueDetailById',
+	//  获取班级详情
+	getClassDetail: API_BASE + '/v2/home/getClassDetailById',
 	//  获取新增统计数据
 	getCensusInfo: API_BASE + '/v2/sale/home/getCustomerCreateStatisticsDetailCount',
 	//  获取新增统计列表

+ 4 - 5
manifest.json

@@ -10,8 +10,7 @@
         "compilerVersion" : 3,
         /* 5+App特有相关 */
         "modules" : {
-            "OAuth" : {},
-            "Payment" : {}
+            "OAuth" : {}
         },
         /* 模块配置 */
         "distribute" : {
@@ -49,15 +48,15 @@
                 "ad" : {},
                 "oauth" : {
                     "weixin" : {
-                        "appid" : "wxc6ab95e70160a2ee",
-                        "appsecret" : "a1eee335af123ba2f7621e6687ddb33b",
+                        "appid" : "wx58efaca110d45796",
+                        "appsecret" : "e0115aba0367b7a9670c6951f5db8bf1",
                         "UniversalLinks" : ""
                     }
                 },
                 "payment" : {
                     "weixin" : {
                         "__platform__" : [ "android" ],
-                        "appid" : "wxc6ab95e70160a2ee",
+                        "appid" : "wx58efaca110d45796",
                         "UniversalLinks" : ""
                     }
                 }

+ 18 - 1
pages.json

@@ -11,7 +11,7 @@
 	}, {
 		"path": "pages/login/index",
 		"style": {
-			"navigationBarTitleText": "星火纵横"
+			"navigationStyle": "custom"
 		}
 	}],
 	"subPackages": [{
@@ -31,6 +31,23 @@
 			"style": {
 				"navigationBarTitleText": "添加信息"
 			}
+		}, {
+			"path": "venueList",
+			"style": {
+				"navigationBarTitleText": "场馆列表"
+			}
+		}, {
+			"path": "venueDetail",
+			"style": {
+				"navigationBarTitleText": "场馆详情",
+				"enablePullDownRefresh": true
+			}
+		}, {
+			"path": "classDetail",
+			"style": {
+				"navigationBarTitleText": "班级详情",
+				"enablePullDownRefresh": true
+			}
 		}]
 	}, {
 		"root": "pagesMain",

+ 22 - 8
pages/index/index.vue

@@ -8,11 +8,11 @@
 				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="goToTodayEnroll()">查看详情</u-button>
 				<view class="section-title" style="margin-top: 40px;">
 					<u-image width="20px" height="10px" :src="sectionIcon"></u-image>
-					<u-section title="场馆推荐" sub-title="查看更多" font-size="32" :show-line="false"></u-section>
+					<u-section title="场馆推荐" sub-title="查看更多" font-size="32" :show-line="false" @click="goToVenueList()"></u-section>
 				</view>
 				<u-card :show-head="false" :show-foot="false" :border="false" margin="0px">
 					<view class="class-show-box" slot="body">
-						<view v-for="(item, index) in videoList" :key="index" class="class-show-card">
+						<view v-for="(item, index) in videoList" :key="index" class="class-show-card" @click="goToVenueDetail(item)">
 							<u-image :src="item.url" mode="aspectFill" height="30vw" border-radius="10px"></u-image>
 							<view class="class-show-name">{{item.name}}</view>
 						</view>
@@ -150,11 +150,11 @@
 		},
 		onLoad() {
 			// _self = this; // 浏览器调试时需要打开,微信调试时需关闭
-			// if (!uni.getStorageSync('token')) {
-			// 	uni.navigateTo({
-			// 		url: '/pages/login/index'
-			// 	});
-			// }
+			if (!uni.getStorageSync('token')) {
+				uni.navigateTo({
+					url: '/pages/login/index'
+				});
+			}
 		},
 		onReady() {
 			this.cWidth = uni.upx2px(750) - 30;
@@ -242,6 +242,18 @@
 					url: '/pagesEnroll/todayEnroll'
 				});
 			},
+			//  跳转所有场馆
+			goToVenueList() {
+				uni.navigateTo({
+					url: '/pagesEnroll/venueList'
+				});
+			},
+			//  跳转场馆详情
+			goToVenueDetail(item) {
+				uni.navigateTo({
+					url: '/pagesEnroll/venueDetail?id=' + item.id
+				});
+			},
 			//  跳转添加信息
 			goToAddForm(path) {
 				uni.navigateTo({
@@ -342,8 +354,10 @@
 				.enroll-img {
 					width: 60px;
 					height: 60px;
+					padding-left: 5px;
 					border-radius: 50%;
-					background-color: red;
+					background-color: #ffffff;
+					box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
 					display: flex;
 					justify-content: center;
 					align-items: center;

+ 45 - 42
pages/login/index.vue

@@ -13,8 +13,9 @@
 					</u-cell-item>
 				</u-cell-group>
 				<u-button type="warning" :ripple="true" :custom-style="{...customStyle, margin: '10px 0'}" @click="login()">登录</u-button>
-				<u-button type="warning" :ripple="true" :custom-style="{...customStyle, backgroundColor: '#07c160'}" open-type="getUserInfo"
-				 @getuserinfo="getUserinfoWechat" withCredentials="true">微信一键登录</u-button>
+				<u-button type="warning" :ripple="true" :custom-style="{...customStyle, margin: '10px 0'}" @click="login1()">app微信授权登录</u-button>
+				<u-button type="warning" :ripple="true" :custom-style="{...customStyle, backgroundColor: '#07c160'}" open-type="getPhoneNumber"
+				 @getphonenumber="getUserinfoWechat" withCredentials="true">微信一键登录</u-button>
 			</view>
 		</u-card>
 		<u-top-tips ref="uTips"></u-top-tips>
@@ -36,6 +37,7 @@
 		data() {
 			return {
 				logo: API.getServerImg + 'logo.png',
+				code: '',
 				account: '',
 				password: '',
 				iconStyle: {
@@ -44,12 +46,22 @@
 				}
 			}
 		},
-		onLoad() {},
+		onShow() {
+			uni.login({
+				provider: 'weixin',
+				success: (res) => {
+					this.code = res.code
+				},
+				fail: () => {
+					this.$refs.uTips.show({
+						title: '微信登录授权失败',
+						type: 'warning',
+					})
+				}
+			})
+		},
 		methods: {
 			login() {
-				uni.reLaunch({
-					url: '/pages/index/index'
-				})
 				if (!this.account || !this.password) {
 					this.$refs.uTips.show({
 						title: '请输入账号密码',
@@ -58,7 +70,7 @@
 					return
 				}
 				NET.request(API.loginByPassword, {
-					name: this.account,
+					phone: this.account,
 					pwd: this.password,
 				}, 'POST').then(res => {
 					uni.setStorage({
@@ -85,44 +97,35 @@
 					})
 				})
 			},
-			getUserinfoWechat(data) {
-				uni.getProvider({
-					service: 'oauth',
-					success: (res) => {
-						if (~res.provider.indexOf('weixin')) {
-							uni.login({
-								provider: 'weixin',
-								success: (res2) => {
-									let wxLoginData = {
-										code: res2.code,
-										encryptedData: data.detail.encryptedData,
-										iv: data.detail.iv,
-									}
-									uni.setStorage({
-										key: 'wxLoginData',
-										data: wxLoginData
-									})
-									this.getUserInfo(wxLoginData)
-								},
-								fail: () => {
-									this.$refs.uTips.show({
-										title: '微信登录授权失败',
-										type: 'warning',
-									})
-								}
-							})
-						} else {
-							this.$refs.uTips.show({
-								title: '请先安装微信或升级版本',
-								type: 'warning',
-							})
-						}
+			loginApp() {
+				let that = this
+				uni.login({
+					provider: 'weixin',
+					success: (loginRes) => {
+						uni.getUserInfo({
+							provider: 'weixin',
+							success: (infoRes) => {}
+						});
 					}
 				});
 			},
+			//  微信一键登录--获取手机号
+			getUserinfoWechat(data) {
+				let wxLoginData = {
+					code: this.code,
+					encryptedData: data.target.encryptedData,
+					iv: data.target.iv,
+				}
+				uni.setStorage({
+					key: 'wxLoginData',
+					data: wxLoginData
+				})
+				this.getUserInfo(wxLoginData)
+			},
 			// 发请求获取个人数据
 			getUserInfo(wxLoginData) {
 				NET.request(API.wxLogin, wxLoginData, 'POST').then(res => {
+					debugger
 					uni.setStorage({
 						key: 'token',
 						data: res.data.token
@@ -142,7 +145,7 @@
 					})
 				}).catch(error => {
 					this.$refs.uTips.show({
-						title: '微信登录授权失败',
+						title: error.message,
 						type: 'warning',
 					})
 				})
@@ -155,11 +158,11 @@
 	.content {
 		width: 100%;
 		height: 100vh;
-		padding: 380rpx 0 60px 0;
+		padding: 480rpx 0 60px 0;
 		float: left;
 
 		.logo {
-			top: 40rpx;
+			top: 140rpx;
 			left: 50%;
 			transform: translateX(-50%);
 			position: absolute;

+ 194 - 0
pagesEnroll/classDetail.vue

@@ -0,0 +1,194 @@
+<template>
+	<view class="content">
+		<u-card :title="classInfo.name" :show-foot="false" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
+			<view slot="body">
+				<view class="class-info-text">
+					<u-icon name="clock"></u-icon>
+					{{classInfo.classStartDate}}&nbsp;&nbsp;{{classInfo.classStartHours}}&nbsp;&nbsp;{{classInfo.residue}}课时
+				</view>
+				<view class="class-info-text">
+					<u-icon name="map"></u-icon>
+					{{classInfo.address}}
+				</view>
+			</view>
+		</u-card>
+		<u-card title="授课教练" :show-foot="false" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
+			<view class="techaer-info-box" slot="body">
+				<u-image :src="classInfo.coachUrl" mode="aspectFill" width="80px" height="80px" border-radius="10px" style=""></u-image>
+				<view class="techaer-info">
+					<view class="class-info-title">{{classInfo.coachName}}</view>
+					<view class="class-info-text">{{classInfo.coachName}}</view>
+				</view>
+			</view>
+		</u-card>
+		<u-card title="班级简介" title-size="32" :show-foot="true" margin="0px 0px 10px 0px" :head-style="cardStyle">
+			<view slot="body">
+				<u-read-more :toggle="true" show-height="100" color="#333333" :shadow-style="shadowStyle">
+					<view class="class-info-text">{{classInfo.desc}}</view>
+				</u-read-more>
+			</view>
+		</u-card>
+		<u-card title="班级展示" :show-foot="false" title-size="32" margin="0px" :head-style="cardStyle">
+			<view class="class-show-box" slot="body">
+				<view v-for="(item, index) in classInfo.showList" :key="index" class="class-show-card">
+					<u-image :src="item.url" mode="aspectFill" height="30vw" border-radius="10px"></u-image>
+					<view class="class-show-name">{{item.name}}</view>
+				</view>
+			</view>
+		</u-card>
+		<u-top-tips ref="uTips"</u-top-tips>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	const NET = require('@/utils/request')
+	const API = require('@/config/api')
+	export default {
+		computed: {
+			...mapGetters([
+				'customStyle',
+			])
+		},
+		data() {
+			return {
+				classId: '',
+				classInfo: {
+					name: '',
+					classStartDate: '',
+					classStartHours: '',
+					residue: '',
+					address: '',
+					coachName: '',
+					coachDesc: '',
+					coachUrl: '',
+					desc: '',
+					showList: [],
+				},
+				handleStyleLeft: {
+					borderRadius: '40px 0 0 40px',
+					borderRight: '1px solid #ffffff'
+				},
+				handleStyleRight: {
+					borderRadius: '0 40px 40px 0',
+					borderLeft: '1px solid #ffffff'
+				},
+				cardStyle: {
+					fontWeight: 'bold'
+				},
+				shadowStyle: {
+					backgroundImage: 'linear-gradient(to bottom, transparent 80rpx, #ffffff 80rpx, #ffffff 100rpx)',
+					paddingTop: "100rpx",
+					marginTop: "-100rpx"
+				},
+			}
+		},
+		onLoad(options) {
+			this.classId = options.id
+			this.initialize()
+		},
+		onShow() {},
+		onPullDownRefresh() {
+			this.initialize()
+			setTimeout(() => {
+				uni.stopPullDownRefresh();
+			}, 500)
+		},
+		methods: {
+			//  获取初始化数据
+			initialize() {
+				NET.request(API.getClassDetail, {
+					id: this.classId
+				}, 'POST').then(res => {
+					this.classInfo = res.data
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
+				})
+			},
+		},
+	}
+</script>
+
+<style>
+	page {
+		width: 100%;
+		height: 100%;
+		background-color: #f7f7f7;
+		position: relative;
+	}
+</style>
+<style lang="scss" scoped>
+	@import "@/static/css/themes.scss";
+
+	.content {
+		width: 100%;
+		float: left;
+
+		.class-info-text {
+			color: #999999;
+			line-height: 18px;
+
+			u-icon {
+				margin-right: 2px;
+			}
+		}
+
+		.student-box {
+			max-height: 200px;
+			padding: 0 15px;
+			margin: 25px 0 0 0;
+			box-sizing: border-box;
+			overflow: auto;
+
+			/deep/.u-card__head {
+				padding-bottom: 0px !important;
+			}
+		}
+
+		.techaer-info-box {
+			display: flex;
+
+			.techaer-info {
+				flex: 1;
+				margin-left: 10px;
+
+				.class-info-title {
+					font-size: 14px;
+					font-weight: bold;
+					margin-bottom: 5px;
+				}
+			}
+		}
+
+		.class-show-box {
+			width: 100%;
+			float: left;
+
+			.class-show-card {
+				width: calc(50% - 16px);
+				margin: 0 8px 16px 8px;
+				float: left;
+
+				.class-show-name {
+					width: 100%;
+					text-align: center;
+					line-height: 20px;
+					font-size: 14px;
+					margin-top: 5px;
+				}
+			}
+		}
+
+		.handle-fix-box {
+			u-button {
+				width: 50%;
+				display: inline-block;
+			}
+		}
+	}
+</style>

+ 23 - 21
pagesEnroll/enrolledForm.vue

@@ -26,7 +26,7 @@
 			<u-form-item label="手机号码" prop="phone" required>
 				<u-input v-model="form.phone" type="number" placeholder="请输入手机号码" />
 			</u-form-item>
-			<u-form-item label="报名班级" prop="classId" required right-icon="arrow-right" @click.native="classShow = true">
+			<u-form-item label="报名班级" prop="className" required right-icon="arrow-right" @click.native="classShow = true">
 				<text>{{form.className}}</text>
 			</u-form-item>
 			<u-form-item label="课时数" prop="courseNumber" required>
@@ -57,13 +57,13 @@
 					</u-checkbox>
 				</u-checkbox-group>
 			</u-form-item>
-			<u-form-item label="销售员" prop="saleId" required right-icon="arrow-right" @click.native="saleShow = true">
+			<u-form-item label="销售员" prop="saleName" required right-icon="arrow-right" @click.native="saleShow = true">
 				<text>{{form.saleName}}</text>
 			</u-form-item>
-			<u-form-item label="谈单人" prop="talkerId" required right-icon="arrow-right" @click.native="talkerShow = true">
+			<u-form-item label="谈单人" prop="talkerName" required right-icon="arrow-right" @click.native="talkerShow = true">
 				<text>{{form.talkerName}}</text>
 			</u-form-item>
-			<u-form-item label="支付方式" prop="payTypeId" required right-icon="arrow-right" @click.native="payTypeShow = true">
+			<u-form-item label="支付方式" prop="payTypeName" required right-icon="arrow-right" @click.native="payTypeShow = true">
 				<text>{{form.payTypeName}}</text>
 			</u-form-item>
 			<u-form-item label="备注">
@@ -97,7 +97,7 @@
 		},
 		data() {
 			return {
-				uploadUrl: '',
+				uploadUrl: API.uploadFile,
 				uploadHeader: {
 					Authorization: uni.getStorageSync('token')
 				},
@@ -127,11 +127,6 @@
 					remark: '',
 				},
 				rules: {
-					imageFileId: [{
-						required: true,
-						message: '请上传学生照片',
-						trigger: 'change'
-					}],
 					coachName: [{
 						required: true,
 						message: '请输入接收人',
@@ -175,7 +170,7 @@
 							message: '请输入正确格式的手机号码'
 						},
 					],
-					classId: [{
+					className: [{
 						required: true,
 						message: '请选择报名班级',
 						trigger: 'change'
@@ -200,17 +195,17 @@
 						message: '请输入订单号',
 						trigger: 'change'
 					}],
-					saleId: [{
+					saleName: [{
 						required: true,
 						message: '请选择销售员',
 						trigger: 'change'
 					}],
-					talkerId: [{
+					talkerName: [{
 						required: true,
 						message: '请选择谈单人',
 						trigger: 'change'
 					}],
-					payTypeId: [{
+					payTypeName: [{
 						required: true,
 						message: '请选择支付方式',
 						trigger: 'change'
@@ -244,12 +239,13 @@
 				payTypeList: [],
 			}
 		},
-		onLoad() {
-			this.uploadUrl = API.uploadFile
-		},
+		onLoad() {},
 		onReady() {
 			this.$refs.form.setRules(this.rules);
-			NET.request(API.getClassList, {}, 'POST').then(res => {
+			NET.request(API.getClassList, {
+				page: 1,
+				size: 1000,
+			}, 'POST').then(res => {
 				this.classList = res.data.row
 			}).catch(error => {
 				this.$refs.uTips.show({
@@ -274,7 +270,10 @@
 					type: 'warning',
 				})
 			})
-			NET.request(API.getSaleList, {}, 'POST').then(res => {
+			NET.request(API.getSaleList, {
+				page: 1,
+				size: 1000,
+			}, 'POST').then(res => {
 				this.saleList = res.data.row
 			}).catch(error => {
 				this.$refs.uTips.show({
@@ -282,7 +281,10 @@
 					type: 'warning',
 				})
 			})
-			NET.request(API.getTalkerList, {}, 'POST').then(res => {
+			NET.request(API.getTalkerList, {
+				page: 1,
+				size: 1000,
+			}, 'POST').then(res => {
 				this.talkerList = res.data.row
 			}).catch(error => {
 				this.$refs.uTips.show({
@@ -312,7 +314,7 @@
 			//  文件上传失败回调
 			uploadError(res, index, lists, name) {
 				this.$refs.uTips.show({
-					title: '文件上传失败',
+					title: error.message,
 					type: 'warning',
 				})
 			},

+ 3 - 3
pagesEnroll/todayEnroll.vue

@@ -19,7 +19,7 @@
 					<u-image width="28px" height="28px" :src="item.type == 1 ? iconPath1 : iconPath2"></u-image>
 				</view>
 			</u-card>
-			<u-divider v-if="isOver" bg-color="transparent">没有更多了</u-divider>
+			<u-divider v-if="isOver" bg-color="transparent" :style="{paddingTop : tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
 		</scroll-view>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
@@ -96,8 +96,8 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tableList = this.tableList.concat(res.data.list)
-					this.isOver = res.data.list.length != 10
+					this.tableList = this.tableList.concat(res.data.row)
+					this.isOver = res.data.row.length != 10
 				}).catch(error => {
 					this.triggered = false
 					this.$refs.uTips.show({

+ 170 - 0
pagesEnroll/venueDetail.vue

@@ -0,0 +1,170 @@
+<template>
+	<view class="content">
+		<u-image :src="venueInfo.url" mode="aspectFill" height="45vw" border-radius="10px" width="calc(100vw - 30px)" style="margin: 10px 15px;float: left;"></u-image>
+		<u-section :title="venueInfo.name" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
+		<view class="venue-text">
+			<u-icon name="map" style="font-size: 14px;margin-right: 2px;"></u-icon>
+			{{venueInfo.address}}
+		</view>
+		<u-section title="场馆简介" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
+		<view class="venue-text">{{venueInfo.desc}}</view>
+		<u-section title="班级信息" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
+		<view class="class-box">
+			<u-card :head-border-bottom="false" :foot-border-top="false" padding="0" margin="10px" v-for="(item, index) in venueInfo.classListResList"
+			 :key="index" class="class-card" @click="goToClassDetail(item)">
+				<view class="class-content" slot="head" style="padding-top: 10px;">
+					<text class="class-name">{{item.name}}</text>
+				</view>
+				<view class="class-content" slot="body" style="padding-bottom: 10px;">
+					<view class="class-info">
+						<view class="class-info-row">
+							<u-icon name="clock"></u-icon>
+							{{item.classStartDate}}&nbsp;&nbsp;{{item.classStartHours}}&nbsp;&nbsp;{{item.residue}}课时
+						</view>
+						<view class="class-info-row">
+							<u-icon name="map"></u-icon>
+							{{item.address}}
+						</view>
+					</view>
+				</view>
+				<view class="class-content" slot="foot" style="padding-bottom: 10px;text-align: right;">
+					<u-button type="warning" shape="circle" :ripple="true" :custom-style="handleCustomStyle" size="mini">详情</u-button>
+				</view>
+			</u-card>
+		</view>
+		<u-top-tips ref="uTips"></u-top-tips>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	const NET = require('@/utils/request')
+	const API = require('@/config/api')
+	export default {
+		computed: {
+			...mapGetters([
+				'customStyle',
+				'handleCustomStyle',
+			])
+		},
+		data() {
+			return {
+				venueId: '',
+				venueInfo: {
+					url: '',
+					name: '',
+					address: '',
+					desc: '',
+					classListResList: [],
+				},
+			}
+		},
+		onLoad(options) {
+			this.venueId = options.id
+			this.initialize()
+		},
+		onShow() {},
+		onPullDownRefresh() {
+			this.initialize()
+			setTimeout(() => {
+				uni.stopPullDownRefresh();
+			}, 500)
+		},
+		methods: {
+			//  获取初始化数据
+			initialize() {
+				NET.request(API.getVenueDetail, {
+					id: this.venueId
+				}, 'POST').then(res => {
+					this.venueInfo = res.data
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
+				})
+			},
+			//  跳转班级详情
+			goToClassDetail(item) {
+				uni.navigateTo({
+					url: '/pagesEnroll/classDetail?id=' + item.id
+				});
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "@/static/css/themes.scss";
+
+	.content {
+		width: 100%;
+		float: left;
+
+		.title-box {
+			width: 100vw;
+			padding: 10px 15px 5px 15px;
+			float: left;
+			box-sizing: border-box;
+		}
+
+		.venue-text {
+			width: 100vw;
+			padding: 5px 15px 15px 15px;
+			float: left;
+			box-sizing: border-box;
+			color: #999999;
+			font-size: 10px;
+			line-height: 16px;
+		}
+
+		.class-box {
+			width: 100vw;
+			padding: 5px;
+			float: left;
+			box-sizing: border-box;
+
+			.class-card {
+				/deep/.u-border:after {
+					border-radius: 20px !important;
+					border-color: #999999;
+				}
+
+				.class-content {
+					width: 100%;
+					padding: 2px 15px;
+					float: left;
+					position: relative;
+				}
+
+				.class-name {
+					height: 20px;
+					font-weight: bold;
+					font-size: 14px;
+					line-height: 20px;
+				}
+
+				.class-info {
+					.class-info-row {
+						color: #999999;
+						line-height: 18px;
+					}
+				}
+			}
+		}
+
+		.student-box {
+			max-height: 200px;
+			padding: 0 15px;
+			margin: 25px 0 0 0;
+			box-sizing: border-box;
+			overflow: auto;
+
+			/deep/.u-card__head {
+				padding-bottom: 0px !important;
+			}
+		}
+	}
+</style>

+ 126 - 0
pagesEnroll/venueList.vue

@@ -0,0 +1,126 @@
+<template>
+	<view class="content">
+		<scroll-view scroll-y class="scroll-box" @scrolltolower="handleLoadMore" :refresher-enabled="true"
+		 :refresher-triggered="triggered" :refresher-threshold="100" refresher-background="white" @refresherrefresh="onRefresh"
+		 @refresherrestore="onRestore">
+			<u-card :foot-border-top="false" padding="0" margin="10px" borderRadius="40" v-for="(item, index) in tableList" :key="index"
+			 class="card-container" @click="goToVenueDetail(item)">
+				<view class="card-content" slot="body">
+					<u-image :src="item.url" mode="aspectFill" height="30vw" border-radius="10px 10px 0 0 "></u-image>
+					<view class="card-info-text">{{item.name}}</view>
+				</view>
+			</u-card>
+			<u-divider v-if="isOver" bg-color="transparent">没有更多了</u-divider>
+		</scroll-view>
+		<u-top-tips ref="uTips"></u-top-tips>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	const NET = require('@/utils/request')
+	const API = require('@/config/api')
+	export default {
+		computed: {
+			...mapGetters([
+				'mainColor'
+			])
+		},
+		data() {
+			return {
+				triggered: false,
+				isOver: false,
+				pageIndex: 1,
+				tableList: [],
+			}
+		},
+		onLoad() {
+			this.getTableList()
+		},
+		onReady() {},
+		methods: {
+			//  下拉刷新
+			onRefresh() {
+				this.triggered = true
+				this.isOver = false
+				this.pageIndex = 1
+				this.tableList = []
+				this.getTableList()
+			},
+			//  重置下拉刷新状态
+			onRestore() {
+				this.triggered = 'restore'
+				this.triggered = false
+			},
+			//  懒加载
+			handleLoadMore() {
+				if (!this.isOver) {
+					this.pageIndex++
+					this.getTableList()
+				}
+			},
+			//  获取列表数据
+			getTableList() {
+				NET.request(API.getAllVenueList, {
+					...uni.getStorageSync('locationData'),
+					page: this.pageIndex,
+					size: 10,
+				}, 'POST').then(res => {
+					this.triggered = false
+					this.tableList = this.tableList.concat(res.data.row)
+					this.isOver = res.data.row.length != 10
+				}).catch(error => {
+					this.triggered = false
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
+				})
+			},
+			//  跳转场馆详情
+			goToVenueDetail(item) {
+				uni.navigateTo({
+					url: '/pagesEnroll/venueDetail?id=' + item.id
+				});
+			},
+		},
+	}
+</script>
+
+<style>
+	page {
+		width: 100%;
+		height: 100%;
+		background-color: #f7f7f7;
+	}
+</style>
+<style lang="scss" scoped>
+	@import "@/static/css/themes.scss";
+
+	.content {
+		width: 100%;
+		float: left;
+
+		.scroll-box {
+			width: 100%;
+			height: 100vh;
+			box-sizing: border-box;
+			padding-bottom: 10px;
+
+			.card-container {
+				width: 50%;
+				float: left;
+
+				.card-info-text {
+					width: 100%;
+					text-align: center;
+					line-height: 18px;
+					font-size: 12px;
+					margin: 5px 0 10px 0;
+				}
+			}
+		}
+	}
+</style>

+ 3 - 3
pagesMain/customerList.vue

@@ -22,7 +22,7 @@
 							<u-image width="28px" height="28px" :src="site.type == 1 ? iconPath1 : iconPath2"></u-image>
 						</view>
 					</u-card>
-					<u-divider v-if="item.isOver" bg-color="transparent">没有更多了</u-divider>
+					<u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : item.tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
@@ -133,8 +133,8 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tabList[index].tableList = this.tabList[index].tableList.concat(res.data.list)
-					this.tabList[index].isOver = res.data.list.length != 10
+					this.tabList[index].tableList = this.tabList[index].tableList.concat(res.data.row)
+					this.tabList[index].isOver = res.data.row.length != 10
 				}).catch(error => {
 					this.triggered = false
 					this.$refs.uTips.show({

+ 3 - 3
pagesMain/marketRankList.vue

@@ -24,7 +24,7 @@
 					<view class="info-money">¥{{item.amount}}</view>
 				</view>
 			</u-card>
-			<u-divider v-if="isOver" bg-color="transparent">没有更多了</u-divider>
+			<u-divider v-if="isOver" bg-color="transparent" style="padding-top: 10px;">没有更多了</u-divider>
 		</scroll-view>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
@@ -111,8 +111,8 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tableList = this.tableList.concat(res.data.list)
-					this.isOver = res.data.list.length != 10
+					this.tableList = this.tableList.concat(res.data.row)
+					this.isOver = res.data.row.length != 10
 				}).catch(error => {
 					this.triggered = false
 					this.$refs.uTips.show({

+ 4 - 4
pagesMain/messageList.vue

@@ -13,7 +13,7 @@
 							<view class="info-text">{{site.content}}</view>
 						</view>
 					</u-card>
-					<u-divider v-if="item.isOver" bg-color="transparent">没有更多了</u-divider>
+					<u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : item.tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
@@ -67,7 +67,7 @@
 			this.getTableList(0)
 			this.getTableList(1)
 			this.getTableList(2)
-			this.getTableList(4)
+			this.getTableList(3)
 		},
 		onReady() {},
 		methods: {
@@ -115,8 +115,8 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tabList[index].tableList = this.tabList[index].tableList.concat(res.data.list)
-					this.tabList[index].isOver = res.data.list.length != 10
+					this.tabList[index].tableList = this.tabList[index].tableList.concat(res.data.row)
+					this.tabList[index].isOver = res.data.row.length != 10
 				}).catch(error => {
 					this.triggered = false
 					this.$refs.uTips.show({

+ 3 - 3
pagesMain/renewList.vue

@@ -16,7 +16,7 @@
 							<u-icon name="arrow-right" color="#aaaaaa" size="36"></u-icon>
 						</view>
 					</u-card>
-					<u-divider v-if="item.isOver" bg-color="transparent">没有更多了</u-divider>
+					<u-divider v-if="item.isOver" bg-color="transparent" style="padding-top: 10px;">没有更多了</u-divider>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
@@ -100,8 +100,8 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tabList[index].tableList = this.tabList[index].tableList.concat(res.data.list)
-					this.tabList[index].isOver = res.data.list.length != 10
+					this.tabList[index].tableList = this.tabList[index].tableList.concat(res.data.row)
+					this.tabList[index].isOver = res.data.row.length != 10
 				}).catch(error => {
 					this.triggered = false
 					this.$refs.uTips.show({

+ 2 - 3
pagesMain/studentInfo.vue

@@ -18,7 +18,6 @@
 				<u-cell-item :title="item.coachName" :value="item.time" :label="item.content" :arrow="false" v-for="(item, index1) in tableList"
 				 :key="index" :title-style="{fontSize: '14px',fontWeight: 'bold'}"></u-cell-item>
 			</u-cell-group>
-			<u-divider v-if="item.isOver" bg-color="transparent">没有更多了</u-divider>
 		</scroll-view>
 		<view class="handle-fix-box">
 			<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="goToRecordForm()">填写沟通记录</u-button>
@@ -108,8 +107,8 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tableList = this.tableList.concat(res.data.list)
-					this.isOver = res.data.list.length != 10
+					this.tableList = this.tableList.concat(res.data.row)
+					this.isOver = res.data.row.length != 10
 				}).catch(error => {
 					this.triggered = false
 					this.$refs.uTips.show({

+ 3 - 18
store/index.js

@@ -1,4 +1,3 @@
-//引入vue和vuex
 import Vue from 'vue'
 import Vuex from 'vuex'
 Vue.use(Vuex)
@@ -24,23 +23,9 @@ const store = new Vuex.Store({ //  全局变量定义
 		},
 	},
 	mutations: {
-		// 登录
-		login(state, provider) {
-			state.userLoginFlag = true;
-			state.userInfo = provider
-			uni.setStorage({ // 异步缓存用户信息
-				key: "userinfo",
-				data: provider
-			})
-			console.log(state.userInfo)
-		},
-		// 退出
-		logout(state) {
-			state.userLoginFlag = false;
-			state.userInfo = {};
-			uni.removeStorage({ // 清除用户信息
-				key: "userinfo"
-			})
+		//  例子
+		test(state, provider) {
+			//  state.mainColor = '';
 		}
 	},
 	getters: {

+ 4 - 3
utils/request.js

@@ -22,13 +22,14 @@ const request = (url, data, method = 'GET') => {
 			success: res => {
 				if (res.statusCode == 200) {
 					let data = res.data
-					if (data.code == 40001) {
+					if (data.status == 30001) {
+						uni.removeStorageSync('token')
 						uni.navigateTo({
-							url: '/pages/index/login'
+							url: '/pages/login/index'
 						});
 						return false
 					}
-					if (data.code == 0 || data.code == 200) {
+					if (data.status == 10000) {
 						resolve(res.data)
 					} else {
 						reject(res.data)