twt 2 yıl önce
ebeveyn
işleme
62734a6aac

+ 14 - 0
pages.json

@@ -348,6 +348,20 @@
 			"style": {
 				"navigationBarTitleText": "订单确认"
 			}
+		},
+		{
+			"path": "pages/integral/scoreRecord",
+			"style": {
+				"navigationBarTitleText": "积分记录",
+				 "enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/integral/exchangeRecord",
+			"style": {
+				"navigationBarTitleText": "兑换记录",
+				 "enablePullDownRefresh": true
+			}
 		}
     ],
 	"tabBar": {

+ 9 - 3
pages/activity/jkDetail.vue

@@ -249,9 +249,14 @@
 				 focusState2:false,
 				 focusState3:false,
 				 focusState4:false,
+				 shareId:'',
 			}
 		},
 		onLoad(opt) {
+		   console.log(opt)
+		   if(opt.shareId){
+			   this.shareId=opt.shareId
+		   }
 		   this.userInfo=this.$store.state.userInfo;
 		   if(this.userInfo){
 		   	this.collectingID=opt.id;
@@ -723,14 +728,15 @@
 		   
 		},
 		onShareAppMessage(res) {
+			console.log(this.userInfo)
 			var img='';
-			if(this.info.ImgList.length>0){
+			/* if(this.info.ImgList.length>0){
 				img=this.info.ImgList[0].url
-			}
+			} */
 			return {
 				title: this.info.activityName,
 				imageUrl:this.mainImg,
-				path: 'pages/activity/jkDetail?id=' + this.id,
+				path: 'pages/activity/jkDetail?id=' + this.collectingID+'&shareId='+this.userInfo.openId,
 				success(res){
 					uni.showToast({
 						title:'分享成功'

+ 40 - 0
pages/integral/exchangeRecord.vue

@@ -0,0 +1,40 @@
+<template>
+ <view class="box">
+	
+ </view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(opt) {
+			
+		},
+		methods: {
+			
+			goDetail(){
+				uni.navigateTo({
+					url:'integralgoodsDetail'
+				})
+			}
+		},
+		onPullDownRefresh(){
+			
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 2000);
+		}
+	}
+</script>
+
+<style scoped>
+.box{
+	background: #F4F5F7;
+	min-height: 100vh;
+}
+
+</style>

+ 12 - 2
pages/integral/integral.vue

@@ -16,12 +16,12 @@
 				
 			</view>
 			<view class="topBottom">
-				<view class="topBottomLine">
+				<view class="topBottomLine" @click="goscoreRecord">
 					<view><img src="../../static/timg/jfjl.png" alt="" class="topBottomLineImg"></view>
 					<view class="topBottomLineTxt">积分记录</view>
 				</view>
 				<view class="topBottomSx"></view>
-				<view class="topBottomLine">
+				<view class="topBottomLine" @click="goexchangeRecord">
 					<view><img src="../../static/timg/dhjl.png" alt="" class="topBottomLineImg"></view>
 					<view class="topBottomLineTxt">兑换记录</view>
 				</view>
@@ -157,6 +157,16 @@
 				uni.navigateTo({
 					url:'integralgoodsDetail?id='+id+'&avaIntegral='+this.avaIntegral
 				})
+			},
+			goscoreRecord(){
+				uni.navigateTo({
+					url:'scoreRecord'
+				})
+			},
+			goexchangeRecord(){
+				uni.navigateTo({
+					url:'exchangeRecord'
+				})
 			}
 		},
 		onReachBottom(){

+ 27 - 1
pages/integral/integralConfirm.vue

@@ -45,7 +45,7 @@
 		onLoad(opt) {
 			this.jfgoodsDetail=uni.getStorageSync("jfgoodsDetail");
 			this.shopName=opt.shopName;
-			this.shopId=opt.shopId;
+			this.shopId=opt.shopID;
 			this.avaIntegral=opt.avaIntegral;
 			this.goodsnum=opt.goodsnum;
 		},
@@ -55,6 +55,32 @@
 				uni.navigateTo({
 					url:'integralgoodsDetail'
 				})
+			},
+			goBuy(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openIntegralMall/exchangeApply', {
+				  shopId:this.shopId,
+				  goodsID:this.jfgoodsDetail.id,
+				  qty:this.goodsnum
+				 },'POST').then(res => {
+						uni.hideLoading();
+						if(res.code==0){
+							this.orderData=res.data
+							uni.showToast({
+								title: '兑换成功',
+								icon: 'none',
+								duration: 3000
+							});
+						}else{
+							uni.showToast({
+								title: res.msg,
+								icon: 'none',
+								duration: 3000
+							});
+						}
+				 })
 			}
 		}
 	}

+ 12 - 2
pages/integral/integralgoodsDetail.vue

@@ -159,7 +159,7 @@
 				shengyuM:21,
 				totalIntegral:'',
 				avaIntegral:'',
-				ckshopShow:true,
+				ckshopShow:false,
 				//snapup:
 			}
 		},
@@ -207,7 +207,17 @@
 				this.ckshopShow=true;
 			},
 			ckshop2(item){
-				this.ckshopShow=false;
+				if(item.qty){
+					this.shopInfo=item;
+					this.ckshopShow=false;
+				}else{
+					uni.showToast({
+						title: '服务门店库存不足',
+						icon: 'none',
+						duration: 3000
+					});
+				}
+				
 			},
 			openGoodsDetailById(){
 				this.$http('openIntegralMall/integralGoodsDetailById', {

+ 40 - 0
pages/integral/scoreRecord.vue

@@ -0,0 +1,40 @@
+<template>
+ <view class="box">
+	
+ </view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(opt) {
+			
+		},
+		methods: {
+			
+			goDetail(){
+				uni.navigateTo({
+					url:'integralgoodsDetail'
+				})
+			}
+		},
+		onPullDownRefresh(){
+			
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 2000);
+		}
+	}
+</script>
+
+<style scoped>
+.box{
+	background: #F4F5F7;
+	min-height: 100vh;
+}
+
+</style>

+ 1 - 1
utils/request.js

@@ -1,6 +1,6 @@
 //测试地址
 const baseUrl = 'http://api.dms.66km.com.cn/'
-//const baseUrl = 'http://192.168.0.123:20187/'
+//const baseUrl = 'http://192.168.0.121:20187/'
 
 //正式地址
 import $store from '../store'