zhengkaixin před 3 roky
rodič
revize
8c224c84ab

+ 9 - 2
README.md

@@ -1,4 +1,4 @@
-#   智能充电系统
+#   荆州工会鹊桥
 发行方式, uniapp  点击”发行“ -”自定义发行“   prod 正式环境| test 测试环境
 
 运行方式  uniapp正常运行方式
@@ -73,6 +73,13 @@ u-loadmore//加载更多
 [](https://www.sojson.com/image2base64.html)
 
 
-测试环境地址:
https://charging.xiaoxinda.com/making-friends-server/doc.html

测试数据库:
47.111.136.126:8100/ jz_makingfriends

构建地址:
http://119.36.146.59:9090/job/making-friends-server/
+测试环境地址:
+https://charging.xiaoxinda.com/making-friends-server/doc.html
+
+测试数据库:
+47.111.136.126:8100/ jz_makingfriends
+
+构建地址:
+http://119.36.146.59:9090/job/making-friends-server/
 
 jenkins账户密码:admin/jpsoft

+ 28 - 0
apis/news.js

@@ -0,0 +1,28 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+
+export function newsTypeList(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/news/newsTypeList'
+	})
+}
+
+export function newscontent(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/news/content'
+	})
+}
+
+export function newsdetail(data) {
+	
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/news/detail'
+	})
+}

binární
assets/img/blankpage.png


binární
assets/img/charge-0.png


binární
assets/img/charge-1.png


binární
assets/img/charge-2.png


binární
assets/img/charge-3.png


binární
assets/img/ddc.png


binární
assets/img/head.png


binární
assets/img/logo_xiaopengguanjia.png


binární
assets/img/min_button_select.png


binární
assets/img/shenhe.png


binární
assets/img/tongguo.png


+ 18 - 18
bobo-router/index.js

@@ -1,5 +1,5 @@
  
-// import  carhelp from '@/utils/mixin.js'
+// import  carhelp from '@/utils/mixin.js'
 
 import Vue from 'vue'
 import uniCrazyRouter from "uni-crazy-router";
@@ -10,29 +10,29 @@ Vue.use(uniCrazyRouter)
 
 uniCrazyRouter.beforeEach(async (to, from, next) => {
 
-
-	routerBeforeEach(to, from, next);
+
+	routerBeforeEach(to, from, next);
 	
 })
 
 uniCrazyRouter.afterEach((to, from) => {
 	// 逻辑代码
-	console.log("afterEach")
-	if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
-		    uni.setNavigationBarTitle({
-		       		title:'智能充电系统('+process.car.NODE_ENV+')',
-		    						
-		    }) 
-		}
+	console.log("afterEach")
+	if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
+		    uni.setNavigationBarTitle({
+		       		title:'荆州工会鹊桥('+process.car.NODE_ENV+')',
+		    						
+		    }) 
+		}
 	
 })
 
 uniCrazyRouter['on' + 'Error']((to, from) => {
 	// 逻辑代码
-	console.log("Error+start")
-	console.log(to)
-	console.log(from)
-	console.log("Error+end")
+	console.log("Error+start")
+	console.log(to)
+	console.log(from)
+	console.log("Error+end")
 	
 })
 
@@ -44,10 +44,10 @@ Vue.use(Router)
 const router = new Router()
 
 // 路由全局拦截器 在这里处理登录、授权等相关操作
-router.beforeEach(function(to, from, next) {
+router.beforeEach(function(to, from, next) {
 	
-	console.log('前置守卫')
-	routerBeforeEach(to, from, next);
+	console.log('前置守卫')
+	routerBeforeEach(to, from, next);
 
 })
  
@@ -65,4 +65,4 @@ router.onError(function(e) {
 	console.log('错误:', e.message || '路由跳转失败')
 })
 
-export default router
+export default router

+ 0 - 112
components/Tabbar.vue

@@ -1,112 +0,0 @@
-<template >
-	<view>
-		<u-tabbar v-model="myCurrent" :list="tabbarList" 
-		:before-switch="beforeSwitch"
-		:mid-button="true" active-color="#1677ff"></u-tabbar>
-		
-	</view>
-</template>
-
-<script>
- 	
- 	export default {
-		name:"tabbarJob",
-		props:{
-			current: 0
-			
-		},
-		data() {
-			return {
-				activeColor:"#5098FF",
-				oldindex:this.current,
-				 myCurrent:this.current,
-				 tabbarList: [{
-				 		iconPath: "motuoche-diandongche",
-				 		selectedIconPath: "motuoche-diandongche",
-				 		text: '充电中',
-				 		count: 0,
-				 		isDot: true,
-				 		customIcon: true,
-						pagePath2:"/pages/index/index?k=1",
-						
-				 	},
-				 	{
-				 		iconPath: "/static/img/min_button_select.png",
-				 		selectedIconPath: "/static/img/min_button_select.png",
-				 		text: '充电',
-				 		midButton: true,
-				 		customIcon: true,
-						pagePath2:"/pages/charge/index",
-				 	},
-				 	{
-				 		iconPath: "31wode",
-				 		selectedIconPath: "31wode",
-				 		text: '我的',
-				 		count: 0,
-				 		isDot: false,
-				 		customIcon: true,
-						pagePath2:"/pages/user/index",
-				 	},
-				 ],
-			};
-			
-		},methods:{
-			beforeSwitch(index){
-				var  tabbarList= [{
-				 		iconPath: "motuoche-diandongche",
-				 		selectedIconPath: "motuoche-diandongche",
-				 		text: '充电中',
-				 		count: 0,
-				 		isDot: true,
-				 		customIcon: true,
-						pagePath2:"/pages/index/index?k=1",
-						
-				 	},
-				 	{
-				 		iconPath: "/static/img/min_button_select.png",
-				 		selectedIconPath: "/static/img/min_button_select.png",
-				 		text: '充电',
-				 		midButton: true,
-				 		customIcon: true,
-						pagePath2:"/pages/charge/index",
-				 	},
-				 	{
-				 		iconPath: "31wode",
-				 		selectedIconPath: "31wode",
-				 		text: '我的',
-				 		count: 0,
-				 		isDot: false,
-				 		customIcon: true,
-						pagePath2:"/pages/user/index",
-				 	},
-				 ]
-				
-				if(index==this.current){
-					return false
-				}
-				//console.log(this.tabbarList)
-				var url =tabbarList[index].pagePath2;
-				
-				uni.navigateTo({
-					url: url
-				})
-				if(index==1){
-					this.myCurrent=this.oldindex;
-					return false;
-				}else{
-					return true;
-				}
-				
-			},
-			
-		},mounted(){
-				 console.log(this.tabbarList)
-		},destroyed(){
-		}
-		
-	}
-</script>
-
-<style>
-	 
-</style>

+ 1 - 1
manifest.json

@@ -79,7 +79,7 @@
                 "enable" : true
             }
         },
-        "title" : "智能充电系统",
+        "title" : "荆州工会鹊桥",
         "router" : {
             "base" : "./"
         }

+ 14 - 9
pages.json

@@ -171,15 +171,20 @@
 			}
 		]
 	},
-	"condition" : { //模式配置,仅开发期间生效
-		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [
-			{
-				"name": "登录", //模式名称
-				"path": "pages/login/index", //启动页面,必选
-				"query": "" //启动参数,在页面的onLoad函数里面得到
-			}
-		]
+	"condition" : { //模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [
+			{
+				"name": "登录", //模式名称
+				"path": "pages/login/index", //启动页面,必选
+				"query": "" //启动参数,在页面的onLoad函数里面得到
+			},
+			{
+				"name": "新闻", //模式名称
+				"path": "pages/news/index", //启动页面,必选
+				"query": "" //启动参数,在页面的onLoad函数里面得到
+			}
+		]
 	}
   
 }

+ 29 - 28
pages/news/detalis.vue

@@ -2,37 +2,17 @@
 	<view>
 		<view class="article">
 			<view class="article-tit">
-				在常态化疫情防控中促进经济向好发展,培育壮大新的增长点增长极,牢牢把握发展主动权
+				{{detail.title}}
 			</view>
 			<view class="article-row">
-				<view class="article-time">2021-01-20 09:00:00</view>
+				<view class="article-time">{{detail.createTime}}</view>
 				<view class="article-see">
 					<u-icon custom-prefix="custom-icon" name="eye-line"></u-icon>
 					<span>321</span>
 				</view>
 			</view>
-			<view class="article-con">
-				<p>完整的产业体系、广阔的内需市场、丰富的人力资源
-					是经济向好发展的重要条件,具有比较优势的数字技术
-					及新型生产经营模式是经济向好发展的有力支撑。贯彻
-					落实党中央决策部署,就能变压力为动力、化危为机,
-					在常态化疫情防控中促进经济向好发展,培育壮大新的
-					增长点增长极,牢牢把握发展主动权。
-					4月17日召开的中共中央政治局会议指出,今年- -季
-					度极不寻常,突如其来的新冠肺炎疫情对我国经济社会
-					发展带来前所未有的冲击;要在稳的基础上积极进取,
-					在常态化疫情防控中全面推进复工复产达产,恢复正常
-					经济社:会秩序,培育壮大新的增长点增长极,牢牢把握
-					发展主动权。当前,我国疫情防控向好态势进一一步巩
-					固,但国际疫情持续蔓延,防范疫情输入压力不断加
-					大,复工复产和经济社会发展面临新的困难和挑战。我
-					们要按照习近平总书记重要讲话、重要指示精神和党中
-					央决策部署,坚持底线思维,做好较长时间应对外部环
-					境变化的思想准备和工作准备,在常态化疫情防控中全
-					力促进经济向好发展,确保完成决战决胜脱贫攻坚目标
-					任务,全面建成小康社会。
-					</p>
-				<img src="/static/img/user1.jpg" alt="">
+			<view class="article-con" v-html="detail.content">
+				 
 			</view>
 			<view class="article-foot">
 				<view class="u-flex">
@@ -56,15 +36,36 @@
 </template>
 
 <script>
+	import * as API from '@/apis/news.js'
+	
 	export default {
 		data() {
 			return {
 				
+				pageTitle: '文章详情',
+				isLoading: false,
+				id: '',
+				detail: {},
 			}
-			methods: {
-
-			}
-
+		
+		},
+		onLoad(op) {
+			
+			this.id =op.id;
+			this.getDetail();
+		},
+		methods: {
+			getDetail() {
+			    API.newsdetail({id:this.id}).then(response => {
+			        this.isLoading = false;
+			        this.detail = response.data;
+				  
+			
+			    }).catch(error => {
+			        this.isLoading = false;
+			        mui.toast(error);
+			    })
+			},
 		}
 	}
 </script>

+ 103 - 13
pages/news/index.vue

@@ -9,30 +9,38 @@
 			<u-swiper :list="wrapList" height="300" border-radius="24"></u-swiper>
 		</view>
 		<view class="newsList">
-			<view class="newsList-item">
+			<view class="newsList-item" 
+				 @click="gotoUrl('pages/news/detalis?id='+item.id)"
+				v-for="(item ,index) in list" :key="item.id" >
 				<view class="newsList-text">
-					<h4 class="u-line-2">还真别说,我幻想过,假如我脑子里有个大容量硬盘,我把维我把维我把维我把维</h4>
-					<p>2021-12-01</p>
+					<h4 class="u-line-2" v-html="item.content">
+						
+					</h4>
+					<p>{{item.createTime}}</p>
 				</view>
-				<u-image class="newsList-img" src="/static/img/user1.jpg" height="150" width="200" border-radius="10"></u-image>
-			</view>
-			<view class="newsList-item">
-				<view class="newsList-text">
-					<h4 class="u-line-2">还真别说,我幻想过,假如我脑子里有个大容量硬盘,我把维我把维我把维我把维</h4>
-					<p>2021-12-01</p>
-				</view>
-				<u-image class="newsList-img" src="/static/img/user1.jpg" height="150" width="200" border-radius="10"></u-image>
+				<u-image class="newsList-img" :src="item.images" height="150" width="200" border-radius="10"></u-image>
 			</view>
+		
 			
-			<u-divider color="#B6BDC3" style="margin-top:20px;">已经到底了</u-divider>
+			<u-divider color="#B6BDC3"  v-if="list.length ==recordsTotal" style="margin-top:20px;">已经到底了</u-divider>
 		</view>
  	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/news.js'
+	
 	export default {
 		data() {
 			return {
+				form:{
+					
+				},
+				newstype:'',
+				typelist: [],
+				pageIndex: 1,
+				recordsTotal: 0,
+				list: [],
 				tabList: [{
 					name: '通知公告'
 				}, {
@@ -55,11 +63,93 @@
 				],
 			}
 		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				
+				this.myLoadmore();
+			}
+		},
+		
 		methods: {
+			getType() {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				this.pageIndex = 1;
+			
+				API.newsTypeList().then((res) => {
+					
+					this.tabList = res.data;
+					if(this.tabList.length){
+						this.newstype=this.tabList[0]	
+					}
+					this.getList()
+ 					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+			getList(bl) {
+				
+				if(this.newstype==""){
+					return
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				if (bl) {
+					this.list = [];
+					this.pageIndex = 1;
+				}
+				var data = {
+					type:this.newstype.shortName,
+					pageSize:5,
+					pageIndex: this.pageIndex
+				};
+				API.newscontent(data).then((res) => {
+					
+					this.list = [
+						...this.list,
+						...res.data.data
+					];
+					this.recordsTotal = res.data.recordsTotal
+					uni.hideLoading()
+					
+				}).catch(error => {
+					uni.showToast({
+					
+						title: error
+					})
+				})
+			},
+			
+			
+			myLoadmore() {
+					
+				this.pageIndex += 1;
+				this.getList()
+			},
 			change(index) {
 				this.current = index;
+				if(this.tabList.length){
+					this.newstype=this.tabList[index]
+				}
+				this.getList(true)
+			},
+			onReady() {
+			
+				this.getType()
+				
 			}
-		}
+		},
+		
 	}
 </script>
 

+ 2 - 1
utils/request.js

@@ -50,7 +50,8 @@ const request = (options) => {
 			if (res.data.code == 200&&res.data.result) {
 				
 				var token = res ? res.data.data.token : '';
-				carhelp.setPersonInfo(res.data.data.regUser );
+				
+				carhelp.setPersonInfo(res.data.data.memberInfo );
 				
 				carhelp.setToken(token);