瀏覽代碼

1.邀请有礼, 分享,
2. 面对面邀请

guo 3 年之前
父節點
當前提交
8f7ae0067f
共有 9 個文件被更改,包括 443 次插入266 次删除
  1. 48 1
      common/request.js
  2. 1 1
      main.js
  3. 9 0
      pages.json
  4. 1 1
      pages/homePage/homePage.vue
  5. 167 159
      pages/me/commissionHistory.vue
  6. 1 1
      pages/me/extract.vue
  7. 37 0
      pages/me/guize.vue
  8. 46 25
      pages/me/invite.vue
  9. 133 78
      pages/me/inviteImg.vue

+ 48 - 1
common/request.js

@@ -94,6 +94,53 @@ const http = (url = '', date = {}, type = 'POST', header = {
         }) 
     });
 }
+// 用去请求图片流
+const httpBinary = (url = '', date = {}, type = 'POST', header = {
+}) => {
+    return new Promise((resolve, reject) => {
+		console.log(burl2 + url)
+		header={};
+		const logodata = uni.getStorageSync("logodata");
+		header['token']=logodata.token;
+		header['uid']=logodata.uid; 
+		//header['token']='98A9FED8814B457288166BDF623F33D1';
+		//header['uid']='39415962-C9D3-466D-A73F-5B5429A8DB2A'; 
+		header['Content-Type']='application/x-www-form-urlencoded';
+		//console.log(header)
+        uni.request({
+            method: type,
+            url: baseUrl + url,
+            data: date,
+            header: header,
+            dataType: 'json', 
+			responseType: "arraybuffer",
+        }).then((response) => {
+           /* setTimeout(function() {
+                uni.hideLoading();
+            }, 200); */
+            let [error, res] = response;
+		 
+			if(res.data.code==401||res.data.code==403){
+				 uni.showToast({
+				     title: res.data.msg,
+				 	 icon:'none',
+				     duration: 3000,
+				 });
+				 uni.clearStorageSync()
+				 uni.navigateTo({
+					url:'../login/login'
+				}) 
+			}else if(res.data.code==409){
+				 // getToken(url,date,type,header)
+			}
+			
+            resolve(res.data);
+        }).catch(error => {
+            let [err, res] = error;
+            reject(err)
+        }) 
+    });
+}
 
 function getToken(url,date,type,header){
 	var header={};
@@ -156,5 +203,5 @@ function refresh(url,date,type,header){
 }
 
 export default {
-	http,baseUrl
+	http,baseUrl,httpBinary
 }

+ 1 - 1
main.js

@@ -3,7 +3,7 @@ import App from './App'
 import request from 'common/request.js'
 import common from 'common/common.js'
 
-
+Vue.prototype.$httpBinary = request.httpBinary
 Vue.prototype.$http = request.http
 Vue.prototype.$request =request
 Vue.prototype.$common =common

+ 9 - 0
pages.json

@@ -375,6 +375,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/me/guize",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "活动规则",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		"color": "#8a8a8a",

+ 1 - 1
pages/homePage/homePage.vue

@@ -338,7 +338,7 @@
 						this.bannerArr.push(res.data.tSSetting.bannerImg);
 					}
 
-					console.log('barner', this.bannerArr);
+					// console.log('barner', this.bannerArr);
 
 					if (res.data.memberCar) {
 						this.mileage = res.data.memberCar.milage

+ 167 - 159
pages/me/commissionHistory.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="box">
 
-		
+
 		<!-- 统计 -->
 		<view class="sumBg">
 			<view class="viewBg">
 				<view class="money" style="color: #FF4F00;">¥{{detailData.totalMoney}}</view>
 				<view class="moneyTitle">累计佣金
-					
+
 				</view>
 			</view>
 
@@ -15,124 +15,125 @@
 			<view class="viewBg">
 				<view class="money">¥{{detailData.withdrawalMoney}}</view>
 				<view class="moneyTitle">累计提现
-					
+
 				</view>
 			</view>
 
 			<view class="line"></view>
-			<view class="viewBg" >
+			<view class="viewBg">
 				<view class="money">¥{{detailData.cantidatMoney}}</view>
 				<view class="moneyTitle">可提现
-					
+
 				</view>
 			</view>
 		</view>
 
 		<!-- 明细 -->
-		<view class="mingxiBg"  v-if="arr.length > 0">
-			
-				<view v-for="(item,index) in arr" :key="index">
-					<view class="itemBg">
-						<image :src='item.MemberHeadImg' mode="" style="width: 72rpx; height: 72rpx; border-radius: 36rpx;"></image>
-						<view class="nickName" v-if="item.MemberNickName">{{item.MemberNickName}}</view>
-						<view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
-						<view class="jine">+{{item.Money}}</view>
-					</view>
+		<view class="mingxiBg" v-if="arr.length > 0">
+
+			<view v-for="(item,index) in arr" :key="index">
+				<view class="itemBg">
+					<image :src='item.MemberHeadImg' mode="" style="width: 72rpx; height: 72rpx; border-radius: 36rpx;">
+					</image>
+					<view class="nickName" v-if="item.MemberNickName">{{item.MemberNickName}}</view>
+					<view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
+					<view class="jine">+{{item.Money}}</view>
 				</view>
-			
-			
-		</view>
-		
-		
-		<!-- 上拉 加载更多 -->
-		<view class="noMore" v-if="noMoreShow">没有更多数据</view>
-		
-		<view style="height: 120rpx;"></view>
-		<view class="bottomView">
-			<view class="goExtract" @click="gonavigateTo('extract?okMoney='+ detailData.cantidatMoney)">去提现</view>
+			</view>
+
+
 		</view>
-		
-		
-		
+
+
+		<!-- 上拉 加载更多 -->
+		<view class="noMore" v-if="noMoreShow">没有更多数据</view>
+
+		<view style="height: 120rpx;"></view>
+		<view class="bottomView">
+			<view class="goExtract" @click="gonavigateTo('extract?okMoney='+ detailData.cantidatMoney)">去提现</view>
+		</view>
+
+
+
 	</view>
 </template>
 
 <script>
 	export default {
 		data() {
-			return {
-				page:1,
-				detailData:{},
-				arr: [],
+			return {
+				page: 1,
+				detailData: {},
+				arr: [],
 				noMoreShow: false,
 			}
-		},
-		onShow() {
-			this.getDetailData();
-			this.page = 1;
-			this.getItemData();
 		},
-		methods: {
-			getDetailData() {
-				uni.showLoading({
-					title: '加载中'
-				})
-				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
-					params = {
-						
-					}
-				this.$http(url, params, 'GET').then(res => {
-					uni.hideLoading();
-					var data = res.data
-					
-					
-					// 处理 undefined和null转为空白字符串
-					
-						for (const key in data) {
-							data[key] = this.$praseStrEmpty(data[key])
-						}
-					
-					this.detailData = data
-					
-					
-					
-				})
-			},
-			getItemData() {
-				uni.showLoading({
-					title: '加载中'
-				})
-				let url = 'worldKeepCar/worldDistribution/listEarningsPage',
-					params = {
-						page:this.page,
-						limit:10,
-					}
-				this.$http(url, params, 'GET').then(res => {
-					uni.hideLoading();
-					var list = res.data.Items
-					
-					// 处理 undefined和null转为空白字符串
-					list.forEach((item, index) => {
-						for (const key in item) {
-							item[key] = this.$praseStrEmpty(item[key])
-						}
-					})
-					
-					
-					if (this.page == 1) {
-						this.arr = list
-					} else {
-						this.arr = this.arr.concat(list)
-					}
-					
-					if (list.length < 10) {
-						this.noMoreShow = true
-					} else {
-						this.noMoreShow = false
-					}
-					
-					
-				})
+		onShow() {
+			this.getDetailData();
+			this.page = 1;
+			this.getItemData();
+		},
+		methods: {
+			getDetailData() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
+					params = {
+
+					}
+				this.$http(url, params, 'GET').then(res => {
+					uni.hideLoading();
+					var data = res.data
+
+
+					// 处理 undefined和null转为空白字符串
+
+					for (const key in data) {
+						data[key] = this.$praseStrEmpty(data[key])
+					}
+
+					this.detailData = data
+
+
+
+				})
+			},
+			getItemData() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				let url = 'worldKeepCar/worldDistribution/listEarningsPage',
+					params = {
+						page: this.page,
+						limit: 10,
+					}
+				this.$http(url, params, 'GET').then(res => {
+					uni.hideLoading();
+					var list = res.data.Items
+
+					// 处理 undefined和null转为空白字符串
+					list.forEach((item, index) => {
+						for (const key in item) {
+							item[key] = this.$praseStrEmpty(item[key])
+						}
+					})
+
+
+					if (this.page == 1) {
+						this.arr = list
+					} else {
+						this.arr = this.arr.concat(list)
+					}
+
+					if (list.length < 10) {
+						this.noMoreShow = true
+					} else {
+						this.noMoreShow = false
+					}
+
+
+				})
 			},
 			gonavigateTo(url) {
 
@@ -140,36 +141,36 @@
 					url: url
 				})
 			}
-		},
-		
-		// 下拉刷新 上拉加载更多
-		onPullDownRefresh() {
-			this.page = 1;
-			this.getItemData()
-			
-			this.getDetailData()
-			setTimeout(function() {
-				uni.stopPullDownRefresh();
-			}, 1000);
-		},
-		onReachBottom() {
-			this.page++;
-		
-			this.getItemData()
-		
-		},
-		
+		},
+
+		// 下拉刷新 上拉加载更多
+		onPullDownRefresh() {
+			this.page = 1;
+			this.getItemData()
+
+			this.getDetailData()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() {
+			this.page++;
+
+			this.getItemData()
+
+		},
+
 	}
 </script>
 
 <style scoped>
 	.box {
 		min-height: 100vh;
-		background: #F4F5F7;
+		background: #F4F5F7;
 		padding-top: 20rpx;
 	}
 
-	
+
 
 	.sumBg {
 		display: flex;
@@ -205,36 +206,40 @@
 
 		background-color: #EEEEEE;
 	}
-	.mingxiBg
-	{
-		margin: 0rpx 24rpx;
-		background-color: #FFFFFF;
-		
-		border-radius: 10rpx;
-		padding: 20rpx;
+
+	.mingxiBg {
+		margin: 0rpx 24rpx;
+		background-color: #FFFFFF;
+
+		border-radius: 10rpx;
+		padding: 20rpx;
 	}
-	
+
 
 	.itemBg {
 
 		height: 98rpx;
-		
+
 		display: flex;
 		justify-content: space-between;
 		align-items: center;
 	}
-	
+
 	.nickName {
 		font-size: 30rpx;
 		color: #3C3C3C;
-		flex-grow: 1;
+		width: 40%;
 		margin: 0 15rpx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
 	}
 
 	.time {
 		font-size: 30rpx;
 		color: #999999;
-		margin: 0 15rpx;
+		
+		width: 27%;
 	}
 
 	.jine {
@@ -242,33 +247,36 @@
 		color: #FF4F00;
 		font-weight: bold;
 		margin: 0 15rpx;
-	}
-	
-	.bottomView{
-		width: 100%;
-		height: 120rpx;
-		
-		position: fixed;
-		left: 0;
-		bottom: 0;
-		background-color: #FFFFFF;
-	}
-	.goExtract{
-		margin: 23rpx 30rpx;
-		border-radius: 37rpx;
-		background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
-		
-		font-size: 30rpx;
-		color: #FFFFFF;
-		font-weight: bold;
-		height: 74rpx;
-		line-height: 74rpx;
-		text-align: center;
-	}
-	.noMore {
-		text-align: center;
-		line-height: 50rpx;
-		color: #999999;
-		font-size: 28rpx;
+		
+	}
+
+	.bottomView {
+		width: 100%;
+		height: 120rpx;
+
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		background-color: #FFFFFF;
+	}
+
+	.goExtract {
+		margin: 23rpx 30rpx;
+		border-radius: 37rpx;
+		background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
+
+		font-size: 30rpx;
+		color: #FFFFFF;
+		font-weight: bold;
+		height: 74rpx;
+		line-height: 74rpx;
+		text-align: center;
+	}
+
+	.noMore {
+		text-align: center;
+		line-height: 50rpx;
+		color: #999999;
+		font-size: 28rpx;
 	}
 </style>

+ 1 - 1
pages/me/extract.vue

@@ -134,7 +134,7 @@
 	.allBtn {
 		font-size: 26rpx;
 		color: #FF4F00;
-		width: 150rpx;
+		width: 170rpx;
 	}
 
 	.zongMoney {

+ 37 - 0
pages/me/guize.vue

@@ -0,0 +1,37 @@
+<template>
+	<view class="content">
+		<rich-text :nodes="couContent" ></rich-text>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				couContent: '',
+			}
+		},
+		onLoad(opt) {
+			console.log('content',opt.couContent);
+			if (opt.couContent) {
+				this.couContent = opt.couContent.replace(/\<p/gi, '<p style="display: inline-block"');
+			}
+		},
+		methods: {
+
+			
+		}
+
+	}
+</script>
+
+<style scoped>
+	.content {
+		background: #F4F5F7;
+		min-height: 100vh;
+		padding: 30rpx 24rpx;
+		
+	}
+	
+	
+</style>

文件差異過大導致無法顯示
+ 46 - 25
pages/me/invite.vue


文件差異過大導致無法顯示
+ 133 - 78
pages/me/inviteImg.vue