tanxue 2 달 전
부모
커밋
521c6a7912
5개의 변경된 파일238개의 추가작업 그리고 0개의 파일을 삭제
  1. 28 0
      pages.json
  2. 8 0
      pages/admin/kaozheng/config.vue
  3. 22 0
      pages/admin/kaozheng/list.vue
  4. 22 0
      pages/admin/tongzhi/details.vue
  5. 158 0
      pages/admin/tongzhi/index.vue

+ 28 - 0
pages.json

@@ -167,6 +167,34 @@
 			{
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path" : "pages/admin/tongzhi/index",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "pages/admin/tongzhi/details",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "pages/admin/kaozheng/list",
+			"style" : 
+			{
+				"navigationBarTitleText" : ""
+			}
+		},
+		{
+			"path" : "pages/admin/kaozheng/config",
+			"style" : 
+			{
+				"navigationBarTitleText" : ""
+			}
 		}
 	],
 	"tabBar": {

+ 8 - 0
pages/admin/kaozheng/config.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 22 - 0
pages/admin/kaozheng/list.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 22 - 0
pages/admin/tongzhi/details.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 158 - 0
pages/admin/tongzhi/index.vue

@@ -0,0 +1,158 @@
+<template>
+	<view class="phone-list-page kecheng-list">
+		<view class="icon-title-bjcolor-navBar-box">
+			<view @click="goUpPage" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">消息管理</text>
+		</view>
+		<!-- 课程列表 -->
+		<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.loading"
+			:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
+			class="phone-scroll-view">
+			<uni-list class="admin-list-box">
+				<uni-list-item v-for="item in data.list" class="admin-list-item-box">
+					<template v-slot:body>
+						<view class="xiaoxi-list-card-box" @click="checkKecheng(item)">
+								<view class="card-name">{{item.zyName}}</view>
+								<view>{{item.zyName}}{{item.zyLevelName}}</view>
+								<view>课时:{{formatSecondsToCnhms(item.period, true)}}</view>
+								<view>{{item.createTime}}</view>
+						</view>
+					</template>
+				</uni-list-item>
+				<uni-load-more :status="data.state" @click="getMore(0)" :contentText="data.contentText"></uni-load-more>
+			</uni-list>
+		</scroll-view>
+
+		<!-- 页面底端 -->
+		<customTabbarClientVue></customTabbarClientVue>
+	</view>
+</template>
+
+<script setup>
+	import customTabbarClientVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
+
+	import {
+		ref,
+		reactive
+	} from "vue";
+	import {
+		onLoad,
+		onShow
+	} from "@dcloudio/uni-app";
+	import * as kechengApi from "@/api/kecheng.js"
+	import {
+		formatSecondsToCnhms
+	} from "@/utils/common.js"
+
+	const data = reactive({
+		zyName: '', // 职业名称
+		list: [], // 考试列表
+		loading: false,
+		page: 0,
+		size: 10,
+		state: 'more',
+		contentText: {
+			contentdown: '查看更多',
+			contentrefresh: '加载中',
+			contentnomore: '没有更多'
+		},
+		from: ''
+	})
+
+	function goUpPage() {
+
+		const pages = getCurrentPages();
+		if (pages.length > 1) {
+			uni.navigateBack()
+		} else {
+			/* uni.redirectTo({
+				url: '/pages/client/ShouYe/shouye'
+			})	 */
+			history.back();
+		}
+
+
+	}
+
+	function handleSearch() {
+		data.page = 0;
+		refreshData();
+	}
+
+	function checkKecheng(item) {
+		uni.navigateTo({
+			url: `/pages/client/Kecheng/study?kcId=${item.kcId}&from=kechengList`
+		})
+	}
+
+	function onRefresh() {
+		data.page = 0;
+		data.list = [];
+		data.loading = true;
+		refreshData();
+	}
+
+	function refreshData() {
+		const opt = {
+			page: 1,
+			size: 10, // 固定查询10条
+			zyName: data.zyName
+		}
+		data.list = [];
+		// 数学
+		data.state = 'loading';
+		data.page++;
+		opt.page = data.page;
+
+		kechengApi.getClientKechengList(opt).then(res => {
+			data.list = data.list.concat(res.data.data);
+			data.loading = false;
+
+			if (res.data.total > data.list.length) {
+				data.state = 'more';
+				data.loading = false;
+			} else {
+				data.state = 'no-more';
+				data.loading = false;
+			}
+		}).catch(err => {
+			data.state = 'more';
+			data.loading = false;
+		})
+	}
+
+	function getMore() {
+		const opt = {
+			page: 1,
+			size: 10, // 固定查询10条
+			zyName: data.zyName
+		}
+		if (data.state == 'no-more') return;
+		data.state = 'loading';
+		data.page++;
+		opt.page = data.page;
+		kechengApi.getClientKechengList(opt).then(res => {
+			data.list = data.list.concat(res.data.data);
+			data.loading = false;
+
+			if (res.data.total > data.list.length) {
+				data.state = 'more';
+				data.loading = false;
+			} else {
+				data.state = 'no-more';
+				data.loading = false;
+			}
+		}).catch(err => {
+			data.state = 'more';
+			data.loading = false;
+		})
+	}
+
+	onLoad((options) => {
+		data.from = options.from;
+	})
+
+	onShow(() => {
+		getMore()
+	})
+</script>