Fly 1 рік тому
батько
коміт
ea5fcc9518

+ 10 - 0
api/government.js

@@ -245,4 +245,14 @@ export const getCircumList = (params) => {
 //获取地图详情
 export const getLocationIinfo = (id, latitude, longitude) => {
 	return yghttp.get(`/location/map/info/${id}?latitude=${latitude}&longitude=${longitude}`)
+}
+// 根据类型id获取类型的模块
+export const classifyModuleList = (classifyId) => {
+	return yghttp.get(`/location/map/classify/module-list`,{classifyId:classifyId})
+}
+
+
+// 获取积分列表
+export const getIntegralList= (params) => {
+	return yghttp.get(`/user/integral/page`, params)
 }

+ 2 - 2
pages/index/personal.vue

@@ -18,7 +18,7 @@
 			</view>
 		</view>
 		<view class="maxBox">
-			<view class="pointsBox" @click="goMypoints()">
+			<!-- <view class="pointsBox" @click="goMypoints()">
 				<view class="pointsBox_l">
 					<image src="/static/czd/myPoint.png" mode=""></image>
 					我的积分
@@ -27,7 +27,7 @@
 					{{userInformation.integral_able}}积分
 					<text class="iconfont_yige">&#xe65f;</text>
 				</view>
-			</view>
+			</view> -->
 			<view class="shopOrderList">
 				<view class="shopOrderList_title">
 					<view class="shopOrderList_title_l">商城订单</view>

+ 95 - 64
pages/research/community/mypoints.vue

@@ -23,7 +23,7 @@
 						可使用积分
 					</view>
 					<view class="available-number">
-						<text>{{myMsg.integral_able}}</text>积分
+						<text>{{ integralNum }}</text>积分
 					</view>
 				</view>
 			</view>
@@ -34,7 +34,7 @@
 					积分任务
 				</view>
 				<view class="line">
-					
+
 				</view>
 				<view class="do">
 					做任务赚积分
@@ -157,17 +157,24 @@
 					立即完成
 				</view>
 			</view> -->
-			
+
 		</view>
 	</view>
 </template>
 
 <script>
-	import {recordInfo} from "../../../api/notice.js"
-	import {getAccountInfo} from "@/api/login.js"
-	export default{
-		data(){
-			return{
+	import {
+		recordInfo
+	} from "../../../api/notice.js"
+	import {
+		getAccountInfo
+	} from "@/api/login.js"
+	import {
+		myUserInfo
+	} from "@/api/government.js"
+	export default {
+		data() {
+			return {
 				config: {
 					back: true, //false是tolbar页面 是则不写
 					title: '我的积分',
@@ -176,10 +183,11 @@
 					backgroundColor: [1, "#FFFFFF"],
 					statusBarFontColor: '#1A1A1A',
 				},
-				myMsg:{},			//我的个人信息
-				integral:{},		//我的积分
+				myMsg: {}, //我的个人信息
+				integral: {}, //我的积分
 				imgUrl: this.$mConfig.staticUrl,
-				id: 0
+				id: 0,
+				integralNum: 0
 			}
 		},
 		onShow() {
@@ -187,55 +195,59 @@
 			this.getMyMsg()
 			this.getuserInfo()
 		},
-		methods:{
-			getuserInfo(){
+		methods: {
+			getuserInfo() {
 				let shop = uni.getStorageSync('shop')
-				this.$http.get('/account/getAccountInfo/'+shop.id).then(async res => {
+				this.$http.get('/account/getAccountInfo/' + shop.id).then(async res => {
 					if (res && res.code == 200) {
-						this.id =res.data.id
+						this.id = res.data.id
 					}
 				})
+				myUserInfo().then(res => {
+					this.integralNum = res.data.integralAble
+				})
 			},
+			// integralNum
 			//跳个人主页
-			goToCommunity(){
+			goToCommunity() {
 				let that = this
 				uni.navigateTo({
-					url:"/pages/research/community/homepage?user_id=" + that.id
+					url: "/pages/research/community/homepage?user_id=" + that.id
 				})
 			},
 			//跳研吧
-			goToRecommend(){
+			goToRecommend() {
 				// uni.navigateTo({
 				// 	url:"/pages/index/recommend"
 				// })
 			},
 			//跳主页
-			goToHomePage(){
+			goToHomePage() {
 				uni.redirectTo({
-					url:"/pages/index/lidaPage"
+					url: "/pages/index/lidaPage"
 				})
 			},
 			//跳转积分明细
-			goTodetailed(){
+			goTodetailed() {
 				uni.navigateTo({
-					url:"./pointsDetails"
+					url: "./pointsDetails"
 				})
 			},
 			//获取积分接口
-			getMyList(){
-				this.$http.get(recordInfo).then(res=>{
-					if(res&&res.code==200){
+			getMyList() {
+				this.$http.get(recordInfo).then(res => {
+					if (res && res.code == 200) {
 						this.integral = res.data
 						console.log(this.integral)
 					}
 				})
 			},
 			//获取我的信息
-			getMyMsg(){
-				this.$http.get(getAccountInfo).then(res=>{
-					if(res&&res.code==200){
+			getMyMsg() {
+				this.$http.get(getAccountInfo).then(res => {
+					if (res && res.code == 200) {
 						this.myMsg = res.data
-						
+
 					}
 				})
 			}
@@ -244,24 +256,27 @@
 </script>
 
 <style lang="scss" scoped>
-	.content{
+	.content {
 		background-color: #ffffff;
 		border-radius: 40rpx 40rpx 0 0;
 		padding: 38rpx 30rpx 0;
-		.content-item{
+
+		.content-item {
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
 			border-bottom: 1rpx solid #E6E6E6;
 			padding-bottom: 36rpx;
-			.purchase{
-				.purchase-commodity{
+
+			.purchase {
+				.purchase-commodity {
 					margin-top: 30rpx;
 					font-size: 28rpx;
 					color: #1A1A1A;
-					font-weight: 400;	
+					font-weight: 400;
 				}
-				.introduce{
+
+				.introduce {
 					font-size: 24rpx;
 					margin-top: 17rpx;
 					color: #999999;
@@ -269,94 +284,110 @@
 					line-height: 30rpx;
 				}
 			}
-			.complete{
+
+			.complete {
 				color: #ffffff;
 				font-size: 28rpx;
 				font-weight: 500;
 				padding: 12rpx 35rpx;
 				border-radius: 32rpx;
-				background-color: rgb(64,194,213);
+				background-color: rgb(64, 194, 213);
 			}
 		}
-		.content-top{
+
+		.content-top {
 			display: flex;
 			align-items: center;
-			.task{
+
+			.task {
 				font-size: 36rpx;
 				color: #1A1A1A;
 				font-weight: 700;
 			}
-			.line{
+
+			.line {
 				width: 1rpx;
 				height: 32rpx;
 				background-color: #707070;
 				margin: 16rpx;
 			}
-			.do{
+
+			.do {
 				font-size: 24rpx;
 				font-weight: 400;
 				color: #666666;
 			}
 		}
 	}
-	.mypoints{
+
+	.mypoints {
 		background-color: #F5F5F5;
 	}
-	.top{
+
+	.top {
 		// margin: 25rpx 30rpx 0 30rpx ;
-		
+
 		padding: 25rpx 30rpx 0;
-		.top-item{
-			
-			background-color: rgb(64,194,213);
+
+		.top-item {
+
+			background-color: rgb(64, 194, 213);
 			// background-repeat: no-repeat;
 			// border-radius: 18rpx;
 			border-top-right-radius: 18rpx;
 			border-top-left-radius: 18rpx;
 			padding: 30rpx 20rpx;
-			.available{
+
+			.available {
 				text-align: center;
 				color: #ffffff;
-					// margin-top: 50rpx;
-				.available-name{
+
+				// margin-top: 50rpx;
+				.available-name {
 					margin-bottom: 6rpx;
 					font-size: 30rpx;
 					font-weight: 400;
 					line-height: 24rpx;
 					// text-shadow: 0rpx 11rpx 49rpx  #2A0709;
 				}
-				.available-number{
-				
+
+				.available-number {
+
 					font-size: 28rpx;
 					font-weight: 700;
 					color: #FFFFFF;
-					text{
+
+					text {
 						font-size: 50rpx;
 					}
 				}
 			}
-			.own{
+
+			.own {
 				display: flex;
 				align-items: center;
-				.image{
-					image{
+
+				.image {
+					image {
 						width: 86rpx;
 						height: 86rpx;
 						border-radius: 50%;
 					}
 				}
-				.name{
+
+				.name {
 					flex: 1;
 					margin-left: 20rpx;
 					font-size: 36rpx;
 					font-weight: 400;
 					color: #ffffff;
-					
+
 				}
-				.detailed{
+
+				.detailed {
 					font-size: 24rpx;
 					// line-height: 30rpx;
-					color: rgb(64,194,213);
+					color: rgb(64, 194, 213);
 					font-weight: 400;
 					// padding: 10rpx 30rpx 14rpx ;
 					background-color: #ffffff;
@@ -366,13 +397,13 @@
 					justify-content: center;
 					width: 195rpx;
 					height: 55rpx;
-					.iconfont{
+
+					.iconfont {
 						font-size: 30rpx;
 						margin-right: 16rpx;
-					}	
+					}
 				}
 			}
 		}
 	}
-	
-</style>
+</style>

+ 36 - 20
pages/research/community/pointsDetails.vue

@@ -2,7 +2,7 @@
 	<view class="points-details">
 		<navbar ref="navbar" :config="config" backColor="#999999"></navbar>
 		<view class="middle">
-			<view class="item" v-for="(item, index) in pointsList" :key="index" >
+			<view class="item" v-for="(item, index) in pointsList" :key="index">
 				<view class="left">
 					<view class="day">
 						<!--           <text v-if="item.model_type == 0">作品</text>
@@ -21,14 +21,14 @@
             <text v-if="item.inner_mode == 9">购买商品</text>
             <text v-if="item.inner_mode == 10">积分商品支付过期退还</text>
             <text v-if="item.inner_mode == 11">取消订单退还</text> -->
-						<text>{{item.mode}}</text>
+						<text>{{item.integralNote}}</text>
 					</view>
 					<view class="time">
-						{{ item.create_time }}
+						{{ item.createTime }}
 					</view>
 				</view>
-				<view class="right" :class="{red:item.bill_type==1}">
-					{{item.bill_type==1?'+':'-'}}{{item.value}}
+				<view class="right" :class="{red:item.billType==1}">
+					{{item.billType==1?'+':'-'}}{{item.value}}
 				</view>
 			</view>
 			<loadMore v-if="pointsList.length>0" :status="status"></loadMore>
@@ -41,6 +41,9 @@
 	import {
 		detailedInfo
 	} from "@/api/notice.js";
+	import {
+		getIntegralList
+	} from "@/api/government.js"
 	export default {
 		data() {
 			return {
@@ -55,7 +58,7 @@
 				pointsList: [],
 				params: {
 					page: 1,
-					limit: 10
+					pageSize: 10
 				},
 				status: 'more', //more|loading|noMore
 			};
@@ -75,17 +78,27 @@
 		},
 		methods: {
 			getMydetailed() {
-				this.$http.get(detailedInfo, this.params).then((res) => {
-					if (res && res.code == 200) {
-						uni.stopPullDownRefresh()
-						this.pointsList = this.pointsList.concat(res.page.list);
-						if (res.page.totalPage <= res.page.currPage) {
-							this.status = 'noMore'
-						} else {
-							this.status = 'more'
-						}
+				getIntegralList(this.params).then(res => {
+					this.pointsList = this.pointsList.concat(res.rows);
+					if (this.pointsList >= res.total) {
+						this.status = 'noMore'
+					} else {
+						this.status = 'more'
 					}
-				});
+				}).finally(() => {
+					uni.stopPullDownRefresh()
+				})
+				// this.$http.get(detailedInfo, this.params).then((res) => {
+				// 	if (res && res.code == 200) {
+				// 		uni.stopPullDownRefresh()
+				// 		this.pointsList = this.pointsList.concat(res.page.list);
+				// 		if (res.page.totalPage <= res.page.currPage) {
+				// 			this.status = 'noMore'
+				// 		} else {
+				// 			this.status = 'more'
+				// 		}
+				// 	}
+				// });
 			},
 		},
 	};
@@ -103,12 +116,12 @@
 			padding-bottom: 36rpx;
 
 			.left {
+				line-height: 1.3;
 				.day {
 					// opacity: 0.9;
 					margin: 34rpx 0 18rpx 0;
 					font-size: 28rpx;
 					color: #1a1a1a;
-					line-height: 30rpx;
 					font-weight: 500;
 				}
 
@@ -120,16 +133,19 @@
 			}
 
 			.right {
+				flex-shrink: 0;
+				padding-left: 20rpx;
 				font-size: 28rpx;
 				font-weight: 500;
 			}
-			.red{
+
+			.red {
 				color: #ff0000;
 			}
 		}
 
-		.item:nth-last-child(2){
+		.item:nth-last-child(2) {
 			border-bottom: none;
 		}
 	}
-</style>
+</style>